blob: a6bffb5db5cc79ae4f6d791e6e44253b0ab250e5 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (16) -->
<title>SharedClassProviderImpl (OpenJ9 JDK 16)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: module: openj9.sharedclasses, package: com.ibm.oti.shared.provider, class: SharedClassProviderImpl">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="com.ibm.oti.shared.provider.SharedClassProviderImpl class">
<meta name="keywords" content="isSharedClassEnabled()">
<meta name="keywords" content="initializeProvider()">
<meta name="keywords" content="findSharedClassURL()">
<meta name="keywords" content="storeSharedClassURL()">
<meta name="keywords" content="findSharedClassURLClasspath()">
<meta name="keywords" content="storeSharedClassURLClasspath()">
<meta name="keywords" content="setURLClasspath()">
<meta name="keywords" content="getCacheSize()">
<meta name="keywords" content="getSoftmxBytes()">
<meta name="keywords" content="getMinAotBytes()">
<meta name="keywords" content="getMaxAotBytes()">
<meta name="keywords" content="getMinJitDataBytes()">
<meta name="keywords" content="getMaxJitDataBytes()">
<meta name="keywords" content="getFreeSpace()">
<meta name="keywords" content="createPermission()">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar.top">
<div class="skip-nav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><div style="margin-top: 9px;"><strong>OpenJ9 JDK 16</strong></div></div>
<ul id="navbar.top.firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="../../../../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/SharedClassProviderImpl.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="module-label-in-type">Module</span>&nbsp;<a href="../../../../../module-summary.html">openj9.sharedclasses</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">com.ibm.oti.shared.provider</a></div>
<h1 title="Class SharedClassProviderImpl" class="title">Class SharedClassProviderImpl</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">java.lang.Object</a>
<div class="inheritance">com.ibm.oti.shared.provider.SharedClassProviderImpl</div>
</div>
<section class="description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">SharedClassProviderImpl</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">Object</a>
implements com.ibm.sharedclasses.spi.SharedClassProvider</span></div>
<div class="block">Implementation of SharedClassProvider.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor.summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><span class="member-name-link"><a href="#%3Cinit%3E()">SharedClassProviderImpl</a></span>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method.summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/security/BasicPermission.html" title="class or interface in java.security" class="external-link" target="_blank">BasicPermission</a></code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#createPermission(java.lang.String,java.lang.String)">createPermission</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;classLoaderClassName,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;actions)</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Constructs a new instance of SharedClassPermission which is a sub-class of BasicPermission.</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>byte[]</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#findSharedClassURL(java.net.URL,java.lang.String)">findSharedClassURL</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>&nbsp;path,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;className)</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Finds a class in the shared cache by using a specific URL and class name.</div>
</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>byte[]</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#findSharedClassURLClasspath(java.lang.String,java.util.function.IntConsumer)">findSharedClassURLClasspath</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;className,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/function/IntConsumer.html" title="class or interface in java.util.function" class="external-link" target="_blank">IntConsumer</a>&nbsp;indexConsumer)</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Finds a class in the shared cache by using the class name given (implicitly using the caller's classpath).</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getCacheSize()">getCacheSize</a></span>()</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Returns the size of the cache that the JVM is currently connected to.</div>
</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getFreeSpace()">getFreeSpace</a></span>()</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Returns the free space in bytes of the cache that the JVM is currently connected to.</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getMaxAotBytes()">getMaxAotBytes</a></span>()</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Returns the maximum space allowed for AOT data of the cache that the JVM is currently connected to.</div>
</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getMaxJitDataBytes()">getMaxJitDataBytes</a></span>()</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Returns the maximum space allowed for JIT data of the cache that the JVM is currently connected to.</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getMinAotBytes()">getMinAotBytes</a></span>()</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Returns the minimum space reserved for AOT data of the cache that the JVM is currently connected to.</div>
</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getMinJitDataBytes()">getMinJitDataBytes</a></span>()</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Returns the minimum space reserved for JIT data of the cache that the JVM is currently connected to.</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getSoftmxBytes()">getSoftmxBytes</a></span>()</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Returns the soft limit in bytes for the available space of the cache that the JVM is currently connected to.</div>
</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>com.ibm.sharedclasses.spi.SharedClassProvider</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#initializeProvider(java.lang.ClassLoader,java.net.URL%5B%5D)">initializeProvider</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link" target="_blank">ClassLoader</a>&nbsp;loader,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>[]&nbsp;classpath)</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Initializes a SharedClassProvider.</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>com.ibm.sharedclasses.spi.SharedClassProvider</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#initializeProvider(java.lang.ClassLoader,java.net.URL%5B%5D,boolean,boolean)">initializeProvider</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link" target="_blank">ClassLoader</a>&nbsp;loader,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>[]&nbsp;classpath,
boolean&nbsp;urlHelper,
boolean&nbsp;tokenHelper)</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Initializes a SharedClassProvider.</div>
</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#isSharedClassEnabled()">isSharedClassEnabled</a></span>()</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Checks whether shared classes are enabled for this JVM.</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#setURLClasspath(java.net.URL%5B%5D)">setURLClasspath</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>[]&nbsp;newClasspath)</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Updates the URLClasspath helper's classpath with a new classpath.</div>
</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#storeSharedClassURL(java.net.URL,java.lang.Class)">storeSharedClassURL</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>&nbsp;path,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link" target="_blank">Class</a>&lt;?&gt;&nbsp;clazz)</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Stores a class in the shared cache by using the URL location it was loaded from.</div>
</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#storeSharedClassURLClasspath(java.lang.Class,int)">storeSharedClassURLClasspath</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link" target="_blank">Class</a>&lt;?&gt;&nbsp;clazz,
int&nbsp;foundAtIndex)</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Stores a class in the shared cache by using the caller's URL classpath.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods.inherited.from.class.java.lang.Object">Methods declared in class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link" target="_blank">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link" target="_blank">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link" target="_blank">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link" target="_blank">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link" target="_blank">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link" target="_blank">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link" target="_blank">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link" target="_blank">toString</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link" target="_blank">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor.detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>SharedClassProviderImpl</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">SharedClassProviderImpl</span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method.detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="isSharedClassEnabled()">
<h3>isSharedClassEnabled</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isSharedClassEnabled</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Checks whether shared classes are enabled for this JVM.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>isSharedClassEnabled</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>boolean
True if shared classes are enabled (using -Xshareclasses on the command-line), false otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="initializeProvider(java.lang.ClassLoader,java.net.URL[])">
<h3>initializeProvider</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">com.ibm.sharedclasses.spi.SharedClassProvider</span>&nbsp;<span class="element-name">initializeProvider</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link" target="_blank">ClassLoader</a>&nbsp;loader,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>[]&nbsp;classpath)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Initializes a SharedClassProvider.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>initializeProvider</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>loader</code> - ClassLoader
The ClassLoader that uses SharedClassProvider.</dd>
<dd><code>classpath</code> - URL[]
The current URL classpath array of the ClassLoader.</dd>
<dt>Returns:</dt>
<dd>SharedClassProvider
A SharedClassProvider if it is successfully initialized, or null otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="initializeProvider(java.lang.ClassLoader,java.net.URL[],boolean,boolean)">
<h3>initializeProvider</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">com.ibm.sharedclasses.spi.SharedClassProvider</span>&nbsp;<span class="element-name">initializeProvider</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link" target="_blank">ClassLoader</a>&nbsp;loader,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>[]&nbsp;classpath,
boolean&nbsp;urlHelper,
boolean&nbsp;tokenHelper)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Initializes a SharedClassProvider.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>initializeProvider</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>loader</code> - ClassLoader
The ClassLoader that uses SharedClassProvider.</dd>
<dd><code>classpath</code> - URL[]
The current URL classpath array of the ClassLoader.</dd>
<dd><code>urlHelper</code> - True if a SharedClassURLHelper needs to be created for this class loader, false otherwise.</dd>
<dd><code>tokenHelper</code> - True if a SharedClassTokenHelper needs to be created for this class loader, false otherwise.</dd>
<dt>Returns:</dt>
<dd>SharedClassProvider
A SharedClassProvider if it is successfully initialized, or null otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findSharedClassURL(java.net.URL,java.lang.String)">
<h3>findSharedClassURL</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name">findSharedClassURL</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>&nbsp;path,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;className)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Finds a class in the shared cache by using a specific URL and class name.
A class will be returned if it was stored against the same URL.</p>
<p>Null is returned if the class cannot be found or if it is stale (see <q>Dynamic cache updates</q>).</p>
<p>To obtain an instance of the class, the byte[] returned must be passed to defineClass by the caller ClassLoader.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>findSharedClassURL</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>path</code> - URL.
A URL path. Cannot be null.</dd>
<dd><code>className</code> - String.
The name of the class to be found</dd>
<dt>Returns:</dt>
<dd>byte[].
A byte array describing the class found, or null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="storeSharedClassURL(java.net.URL,java.lang.Class)">
<h3>storeSharedClassURL</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">storeSharedClassURL</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>&nbsp;path,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link" target="_blank">Class</a>&lt;?&gt;&nbsp;clazz)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Stores a class in the shared cache by using the URL location it was loaded from.
The class that is being stored must have been defined by the caller ClassLoader and must exist in the URL location specified.
Returns <code>true</code> if the class is stored successfully or <code>false</code> otherwise.</p>
<p>Will return <code>false</code> if the class that is being stored was not defined by the caller ClassLoader.</p>
<p>Also returns <code>false</code> if the URL is not a file URL or if the resource it refers to does not exist.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>storeSharedClassURL</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>path</code> - URL.
The URL path that the class was loaded from. Cannot be null.</dd>
<dd><code>clazz</code> - Class.
The class to store in the shared cache</dd>
<dt>Returns:</dt>
<dd>boolean.
True if the class was stored successfully, false otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findSharedClassURLClasspath(java.lang.String,java.util.function.IntConsumer)">
<h3>findSharedClassURLClasspath</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name">findSharedClassURLClasspath</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;className,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/function/IntConsumer.html" title="class or interface in java.util.function" class="external-link" target="_blank">IntConsumer</a>&nbsp;indexConsumer)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Finds a class in the shared cache by using the class name given (implicitly using the caller's classpath).</p>
<p>See <q>Using classpaths</q> for rules on when a class will be found.<br>
Null is returned if the class cannot be found, if it is stale (see <q>Dynamic cache updates</q>)
or if it is found for an unconfirmed entry (see <q>Using classpaths</q>).</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>findSharedClassURLClasspath</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>className</code> - String.
The name of the class to be found</dd>
<dd><code>indexConsumer</code> - IntConsumer.
The consumer used to receive the classpath index if desired.</dd>
<dt>Returns:</dt>
<dd>byte[].
A byte array describing the class found, or null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="storeSharedClassURLClasspath(java.lang.Class,int)">
<h3>storeSharedClassURLClasspath</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">storeSharedClassURLClasspath</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link" target="_blank">Class</a>&lt;?&gt;&nbsp;clazz,
int&nbsp;foundAtIndex)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Stores a class in the shared cache by using the caller's URL classpath.</p>
<p>The class being stored must have been defined by the caller ClassLoader and must exist in the URL location specified.</p>
<p>Returns <code>true</code> if the class is stored successfully or <code>false</code> otherwise.</p>
<p>Will return <code>false</code> if the class being stored was not defined by the caller ClassLoader.</p>
<p>Also returns <code>false</code> if the URL at foundAtIndex is not a file URL or if the resource it refers to does not exist. </p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>storeSharedClassURLClasspath</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>clazz</code> - Class.
The class to store in the shared cache</dd>
<dd><code>foundAtIndex</code> - int.
The index in the caller's classpath where the class was loaded from (first entry is 0).</dd>
<dt>Returns:</dt>
<dd>boolean.
True if the class was stored successfully, false otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setURLClasspath(java.net.URL[])">
<h3>setURLClasspath</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">setURLClasspath</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link" target="_blank">URL</a>[]&nbsp;newClasspath)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Updates the URLClasspath helper's classpath with a new classpath.</p>
<p>This function is useful for ClassLoaders that compute their classpath lazily. The initial classpath
is passed to the constructor optimistically, but if the classloader discovers a change while reading
an entry, it can update the classpath by using this function.</p>
<p><b>Note:</b> It is essential that the helper's classpath is kept up-to-date with the classloader.</p>
<p>The classpath that is passed to this function must be exactly the same as the original
classpath up to and including the right-most entry that classes have been loaded from (the right-most <q>confirmed</q> entry).</p>
<p>After the classpath has been updated, any indexes passed to storeSharedClassURLClasspath and returned from
findSharedClassURLClasspath correspond to the new classpath.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>setURLClasspath</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>newClasspath</code> - The new URL classpath array</dd>
<dt>Returns:</dt>
<dd>boolean.
True if the classpath has been set, false otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCacheSize()">
<h3>getCacheSize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getCacheSize</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Returns the size of the cache that the JVM is currently connected to.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>getCacheSize</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>long.
The total size in bytes of the shared cache.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSoftmxBytes()">
<h3>getSoftmxBytes</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getSoftmxBytes</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Returns the soft limit in bytes for the available space of the cache that the JVM is currently connected to.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>getSoftmxBytes</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>long.
The soft max size or cache size in bytes if it is not set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMinAotBytes()">
<h3>getMinAotBytes</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getMinAotBytes</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Returns the minimum space reserved for AOT data of the cache that the JVM is currently connected to.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>getMinAotBytes</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>long.
The minimum shared classes cache space reserved for AOT data in bytes or -1 if it is not set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxAotBytes()">
<h3>getMaxAotBytes</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getMaxAotBytes</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Returns the maximum space allowed for AOT data of the cache that the JVM is currently connected to.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>getMaxAotBytes</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>long.
The maximum shared classes cache space allowed for AOT data in bytes or -1 if it is not set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMinJitDataBytes()">
<h3>getMinJitDataBytes</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getMinJitDataBytes</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Returns the minimum space reserved for JIT data of the cache that the JVM is currently connected to.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>getMinJitDataBytes</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>long.
The minimum shared classes cache space reserved for JIT data in bytes or -1 if it is not set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxJitDataBytes()">
<h3>getMaxJitDataBytes</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getMaxJitDataBytes</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Returns the maximum space allowed for JIT data of the cache that the JVM is currently connected to.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>getMaxJitDataBytes</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>long.
The maximum shared classes cache space allowed for JIT data in bytes or -1 if it is not set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFreeSpace()">
<h3>getFreeSpace</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getFreeSpace</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Returns the free space in bytes of the cache that the JVM is currently connected to.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>getFreeSpace</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Returns:</dt>
<dd>long.
The free space of the shared classes cache.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createPermission(java.lang.String,java.lang.String)">
<h3>createPermission</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/security/BasicPermission.html" title="class or interface in java.security" class="external-link" target="_blank">BasicPermission</a></span>&nbsp;<span class="element-name">createPermission</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;classLoaderClassName,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a>&nbsp;actions)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></span></div>
<div class="block"><p>Constructs a new instance of SharedClassPermission which is a sub-class of BasicPermission.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code>createPermission</code>&nbsp;in interface&nbsp;<code>com.ibm.sharedclasses.spi.SharedClassProvider</code></dd>
<dt>Parameters:</dt>
<dd><code>classLoaderClassName</code> - java.lang.String.
The class name of the class loader requiring the permission.</dd>
<dd><code>actions</code> - java.lang.String.
The actions which are applicable to it.</dd>
<dt>Returns:</dt>
<dd>BasicPermission.
A new instance of SharedClassPermission which is a sub-class of BasicPermission, or null if shared classes are not enabled.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small><a href="https://www.eclipse.org/openj9/" target="_blank">Eclipse OpenJ9 website.</a><br> To raise a bug report or suggest an improvement create an <a href="https://github.com/eclipse-openj9/openj9/issues" target="_blank">Eclipse Openj9 issue.</a><br> Copyright &copy; 1998, 2021, IBM Corp. and others.</small></p>
</footer>
</div>
</div>
</body>
</html>