blob: 5403d47d396ae44c3d634f1d6e7cca547159e608 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ResourceManager (Apache Geode 1.15.0)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ResourceManager (Apache Geode 1.15.0)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/geode/cache/control/RebalanceResults.html" title="interface in org.apache.geode.cache.control"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/geode/cache/control/RestoreRedundancyOperation.html" title="interface in org.apache.geode.cache.control"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/geode/cache/control/ResourceManager.html" target="_top">Frames</a></li>
<li><a href="ResourceManager.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.geode.cache.control</div>
<h2 title="Interface ResourceManager" class="title">Interface ResourceManager</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ResourceManager</span></pre>
<div class="block">Provides support for managing resources used by the local <a href="../../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a>.
<p>
Re-balancing the GemFire Cache resources can be accomplished using a <a href="../../../../../org/apache/geode/cache/control/RebalanceOperation.html" title="interface in org.apache.geode.cache.control"><code>RebalanceOperation</code></a>:
<pre>
ResourceManager resourceManager = cache.getResourceManager();
RebalanceOperation rebalanceOp = resourceManager.createRebalanceFactory().start();
</pre>
Monitoring of heap utilization is enabled by setting the critical heap percentage using
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setCriticalHeapPercentage-float-"><code>setCriticalHeapPercentage(float)</code></a>.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#DEFAULT_CRITICAL_PERCENTAGE">DEFAULT_CRITICAL_PERCENTAGE</a></span></code>
<div class="block">The default percent of heap memory at which the VM is considered in a critical state.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#DEFAULT_EVICTION_PERCENTAGE">DEFAULT_EVICTION_PERCENTAGE</a></span></code>
<div class="block">The default percent of heap memory at which the VM should begin evicting data.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/control/RebalanceFactory.html" title="interface in org.apache.geode.cache.control">RebalanceFactory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#createRebalanceFactory--">createRebalanceFactory</a></span>()</code>
<div class="block">Creates a factory for defining and starting <a href="../../../../../org/apache/geode/cache/control/RebalanceOperation.html" title="interface in org.apache.geode.cache.control"><code>RebalanceOperations</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/control/RestoreRedundancyOperation.html" title="interface in org.apache.geode.cache.control">RestoreRedundancyOperation</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#createRestoreRedundancyOperation--">createRestoreRedundancyOperation</a></span>()</code>
<div class="block">Creates a <a href="../../../../../org/apache/geode/cache/control/RestoreRedundancyOperation.html" title="interface in org.apache.geode.cache.control"><code>RestoreRedundancyOperation</code></a> class for defining and starting restore redundancy
operations and for determining the redundancy status of regions.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getCriticalHeapPercentage--">getCriticalHeapPercentage</a></span>()</code>
<div class="block">Get the percentage of heap at or above which the cache is considered in danger of becoming
inoperable.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getCriticalOffHeapPercentage--">getCriticalOffHeapPercentage</a></span>()</code>
<div class="block">Get the percentage of off-heap at or above which the cache is considered in danger of becoming
inoperable.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getEvictionHeapPercentage--">getEvictionHeapPercentage</a></span>()</code>
<div class="block">Get the percentage of heap at or above which the eviction should begin on Regions configured
for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getEvictionOffHeapPercentage--">getEvictionOffHeapPercentage</a></span>()</code>
<div class="block">Get the percentage of off-heap at or above which the eviction should begin on Regions
configured for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="../../../../../org/apache/geode/cache/control/RebalanceOperation.html" title="interface in org.apache.geode.cache.control">RebalanceOperation</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getRebalanceOperations--">getRebalanceOperations</a></span>()</code>
<div class="block">Returns a set of all active <a href="../../../../../org/apache/geode/cache/control/RebalanceOperation.html" title="interface in org.apache.geode.cache.control"><code>RebalanceOperations</code></a> that were started
locally on this member.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html?is-external=true" title="class or interface in java.util.concurrent">CompletableFuture</a>&lt;<a href="../../../../../org/apache/geode/management/runtime/RestoreRedundancyResults.html" title="interface in org.apache.geode.management.runtime">RestoreRedundancyResults</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getRestoreRedundancyFutures--">getRestoreRedundancyFutures</a></span>()</code>
<div class="block">Returns a set of all active restore redundancy futures that were started locally on this
member.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setCriticalHeapPercentage-float-">setCriticalHeapPercentage</a></span>(float&nbsp;heapPercentage)</code>
<div class="block">Set the percentage of heap at or above which the cache is considered in danger of becoming
inoperable due to garbage collection pauses or out of memory exceptions.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setCriticalOffHeapPercentage-float-">setCriticalOffHeapPercentage</a></span>(float&nbsp;offHeapPercentage)</code>
<div class="block">Set the percentage of off-heap at or above which the cache is considered in danger of becoming
inoperable due to out of memory exceptions.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setEvictionHeapPercentage-float-">setEvictionHeapPercentage</a></span>(float&nbsp;heapPercentage)</code>
<div class="block">Set the percentage of heap at or above which the eviction should begin on Regions configured
for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setEvictionOffHeapPercentage-float-">setEvictionOffHeapPercentage</a></span>(float&nbsp;offHeapPercentage)</code>
<div class="block">Set the percentage of off-heap at or above which the eviction should begin on Regions
configured for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_CRITICAL_PERCENTAGE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_CRITICAL_PERCENTAGE</h4>
<pre>static final&nbsp;float DEFAULT_CRITICAL_PERCENTAGE</pre>
<div class="block">The default percent of heap memory at which the VM is considered in a critical state. Current
value is <code>0.0</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setCriticalHeapPercentage-float-"><code>setCriticalHeapPercentage(float)</code></a>,
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getCriticalHeapPercentage--"><code>getCriticalHeapPercentage()</code></a>,
<a href="../../../../../constant-values.html#org.apache.geode.cache.control.ResourceManager.DEFAULT_CRITICAL_PERCENTAGE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_EVICTION_PERCENTAGE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_EVICTION_PERCENTAGE</h4>
<pre>static final&nbsp;float DEFAULT_EVICTION_PERCENTAGE</pre>
<div class="block">The default percent of heap memory at which the VM should begin evicting data. Current value is
<code>0.0</code>. Note that if a HeapLRU is created and the eviction heap percentage has not
been set then it will default <code>80.0</code> unless the critical heap percentage has been
set in which case it will default to a value <code>5.0</code> less than the critical heap
percentage.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setEvictionHeapPercentage-float-"><code>setEvictionHeapPercentage(float)</code></a>,
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getEvictionHeapPercentage--"><code>getEvictionHeapPercentage()</code></a>,
<a href="../../../../../constant-values.html#org.apache.geode.cache.control.ResourceManager.DEFAULT_EVICTION_PERCENTAGE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="createRebalanceFactory--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRebalanceFactory</h4>
<pre><a href="../../../../../org/apache/geode/cache/control/RebalanceFactory.html" title="interface in org.apache.geode.cache.control">RebalanceFactory</a>&nbsp;createRebalanceFactory()</pre>
<div class="block">Creates a factory for defining and starting <a href="../../../../../org/apache/geode/cache/control/RebalanceOperation.html" title="interface in org.apache.geode.cache.control"><code>RebalanceOperations</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a factory for defining and starting RebalanceOperations</dd>
</dl>
</li>
</ul>
<a name="getRebalanceOperations--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRebalanceOperations</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="../../../../../org/apache/geode/cache/control/RebalanceOperation.html" title="interface in org.apache.geode.cache.control">RebalanceOperation</a>&gt;&nbsp;getRebalanceOperations()</pre>
<div class="block">Returns a set of all active <a href="../../../../../org/apache/geode/cache/control/RebalanceOperation.html" title="interface in org.apache.geode.cache.control"><code>RebalanceOperations</code></a> that were started
locally on this member.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a set of all active RebalanceOperations started locally</dd>
</dl>
</li>
</ul>
<a name="createRestoreRedundancyOperation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRestoreRedundancyOperation</h4>
<pre><a href="../../../../../org/apache/geode/cache/control/RestoreRedundancyOperation.html" title="interface in org.apache.geode.cache.control">RestoreRedundancyOperation</a>&nbsp;createRestoreRedundancyOperation()</pre>
<div class="block">Creates a <a href="../../../../../org/apache/geode/cache/control/RestoreRedundancyOperation.html" title="interface in org.apache.geode.cache.control"><code>RestoreRedundancyOperation</code></a> class for defining and starting restore redundancy
operations and for determining the redundancy status of regions. Similar to a rebalance
operation, a restore redundancy operation will attempt to bring each included region to its
configured redundancy level by creating redundant copies of buckets, and will also optionally
reassign which members host the primary buckets for better load balancing. A restore redundancy
operation differs from a rebalance operation in that it will not move buckets from one member
to another.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a class for defining and starting restore redundancy operations</dd>
</dl>
</li>
</ul>
<a name="getRestoreRedundancyFutures--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRestoreRedundancyFutures</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html?is-external=true" title="class or interface in java.util.concurrent">CompletableFuture</a>&lt;<a href="../../../../../org/apache/geode/management/runtime/RestoreRedundancyResults.html" title="interface in org.apache.geode.management.runtime">RestoreRedundancyResults</a>&gt;&gt;&nbsp;getRestoreRedundancyFutures()</pre>
<div class="block">Returns a set of all active restore redundancy futures that were started locally on this
member.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a set of all active restore redundancy futures started locally.</dd>
</dl>
</li>
</ul>
<a name="setCriticalHeapPercentage-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCriticalHeapPercentage</h4>
<pre>void&nbsp;setCriticalHeapPercentage(float&nbsp;heapPercentage)</pre>
<div class="block">Set the percentage of heap at or above which the cache is considered in danger of becoming
inoperable due to garbage collection pauses or out of memory exceptions.
<p>
Changing this value can cause <a href="../../../../../org/apache/geode/cache/LowMemoryException.html" title="class in org.apache.geode.cache"><code>LowMemoryException</code></a> to be thrown from the following
<a href="../../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> operations:
<ul>
<li><a href="../../../../../org/apache/geode/cache/Region.html#put-K-V-"><code>Region.put(Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#put-K-V-java.lang.Object-"><code>Region.put(Object, Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#create-K-V-"><code>Region.create(Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#create-K-V-java.lang.Object-"><code>Region.create(Object, Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#putAll-java.util.Map-"><code>Region.putAll(java.util.Map)</code></a>
<li><a href="../../../../../org/apache/geode/cache/query/QueryService.html#createIndex-java.lang.String-org.apache.geode.cache.query.IndexType-java.lang.String-java.lang.String-">index creation</a>
<li>Execution of <a href="../../../../../org/apache/geode/cache/execute/Function.html" title="interface in org.apache.geode.cache.execute"><code>Function</code></a>s whose <a href="../../../../../org/apache/geode/cache/execute/Function.html#optimizeForWrite--"><code>Function.optimizeForWrite()</code></a> returns true.
</ul>
<p>
Only one change to this attribute or the eviction heap percentage will be allowed at any given
time and its effect will be fully realized before the next change is allowed.
When using this threshold, the VM must be launched with the <code>-Xmx</code> and
<code>-Xms</code> switches set to the same values. Many virtual machine implementations have
additional VM switches to control the behavior of the garbage collector. We suggest that you
investigate tuning the garbage collector when using this type of eviction controller. A
collector that frequently collects is needed to keep our heap usage up to date. In particular,
on the Sun <A href="http://java.sun.com/docs/hotspot/gc/index.html">HotSpot</a> VM,
before Java 14,
the <code>-XX:+UseConcMarkSweepGC</code> flag needs to be set, and
<code>-XX:CMSInitiatingOccupancyFraction=N</code> should be set with N being a percentage that
is less than the <a href="../../../../../org/apache/geode/cache/control/ResourceManager.html" title="interface in org.apache.geode.cache.control"><code>ResourceManager</code></a> critical and eviction heap thresholds.
The JRockit VM has similar flags, <code>-Xgc:gencon</code> and <code>-XXgcTrigger:N</code>,
which are required if using this feature. Please Note: the JRockit gcTrigger flag is based on
heap free, not heap in use like the GemFire parameter. This means you need to set gcTrigger to
100-N. for example, if your eviction threshold is 30 percent, you will need to set gcTrigger to
70 percent.
On the IBM VM, the flag to get a similar collector is <code>-Xgcpolicy:gencon</code>, but there
is no corollary to the gcTrigger/CMSInitiatingOccupancyFraction flags, so when using this
feature with an IBM VM, the heap usage statistics might lag the true memory usage of the VM,
and thresholds may need to be set sufficiently high that the VM will initiate GC before the
thresholds are crossed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>heapPercentage</code> - a percentage of the maximum tenured heap for the VM</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the heapPercentage value is not &gt;= 0 or &lt;= 100 or when
less
than the current eviction heap percentage</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getCriticalHeapPercentage--"><code>getCriticalHeapPercentage()</code></a>,
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getEvictionHeapPercentage--"><code>getEvictionHeapPercentage()</code></a></dd>
</dl>
</li>
</ul>
<a name="getCriticalHeapPercentage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCriticalHeapPercentage</h4>
<pre>float&nbsp;getCriticalHeapPercentage()</pre>
<div class="block">Get the percentage of heap at or above which the cache is considered in danger of becoming
inoperable.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>either the current or recently used percentage of the maximum tenured heap</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setCriticalHeapPercentage-float-"><code>setCriticalHeapPercentage(float)</code></a></dd>
</dl>
</li>
</ul>
<a name="setCriticalOffHeapPercentage-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCriticalOffHeapPercentage</h4>
<pre>void&nbsp;setCriticalOffHeapPercentage(float&nbsp;offHeapPercentage)</pre>
<div class="block">Set the percentage of off-heap at or above which the cache is considered in danger of becoming
inoperable due to out of memory exceptions.
<p>
Changing this value can cause <a href="../../../../../org/apache/geode/cache/LowMemoryException.html" title="class in org.apache.geode.cache"><code>LowMemoryException</code></a> to be thrown from the following
<a href="../../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> operations:
<ul>
<li><a href="../../../../../org/apache/geode/cache/Region.html#put-K-V-"><code>Region.put(Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#put-K-V-java.lang.Object-"><code>Region.put(Object, Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#create-K-V-"><code>Region.create(Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#create-K-V-java.lang.Object-"><code>Region.create(Object, Object, Object)</code></a>
<li><a href="../../../../../org/apache/geode/cache/Region.html#putAll-java.util.Map-"><code>Region.putAll(java.util.Map)</code></a>
<li><a href="../../../../../org/apache/geode/cache/query/QueryService.html#createIndex-java.lang.String-org.apache.geode.cache.query.IndexType-java.lang.String-java.lang.String-">index creation</a>
<li>Execution of <a href="../../../../../org/apache/geode/cache/execute/Function.html" title="interface in org.apache.geode.cache.execute"><code>Function</code></a>s whose <a href="../../../../../org/apache/geode/cache/execute/Function.html#optimizeForWrite--"><code>Function.optimizeForWrite()</code></a> returns true.
</ul>
<p>
Only one change to this attribute or the eviction off-heap percentage will be allowed at any
given time and its effect will be fully realized before the next change is allowed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offHeapPercentage</code> - a percentage of the maximum off-heap memory available</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the ofHeapPercentage value is not &gt;= 0 or &lt;= 100 or when
less
than the current eviction off-heap percentage</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Geode 1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getCriticalOffHeapPercentage--"><code>getCriticalOffHeapPercentage()</code></a>,
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getEvictionOffHeapPercentage--"><code>getEvictionOffHeapPercentage()</code></a></dd>
</dl>
</li>
</ul>
<a name="getCriticalOffHeapPercentage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCriticalOffHeapPercentage</h4>
<pre>float&nbsp;getCriticalOffHeapPercentage()</pre>
<div class="block">Get the percentage of off-heap at or above which the cache is considered in danger of becoming
inoperable.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>either the current or recently used percentage of the maximum off-heap memory</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Geode 1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setCriticalOffHeapPercentage-float-"><code>setCriticalOffHeapPercentage(float)</code></a></dd>
</dl>
</li>
</ul>
<a name="setEvictionHeapPercentage-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEvictionHeapPercentage</h4>
<pre>void&nbsp;setEvictionHeapPercentage(float&nbsp;heapPercentage)</pre>
<div class="block">Set the percentage of heap at or above which the eviction should begin on Regions configured
for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.
<p>
Changing this value may cause eviction to begin immediately.
<p>
Only one change to this attribute or critical heap percentage will be allowed at any given time
and its effect will be fully realized before the next change is allowed.
This feature requires additional VM flags to perform properly. See
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setCriticalHeapPercentage-float-">setCriticalHeapPercentage() for
details.</a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>heapPercentage</code> - a percentage of the maximum tenured heap for the VM</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the heapPercentage value is not &gt;= 0 or &lt;= 100 or when
greater
than the current critical heap percentage.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getEvictionHeapPercentage--"><code>getEvictionHeapPercentage()</code></a>,
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getCriticalHeapPercentage--"><code>getCriticalHeapPercentage()</code></a></dd>
</dl>
</li>
</ul>
<a name="getEvictionHeapPercentage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEvictionHeapPercentage</h4>
<pre>float&nbsp;getEvictionHeapPercentage()</pre>
<div class="block">Get the percentage of heap at or above which the eviction should begin on Regions configured
for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>either the current or recently used percentage of the maximum tenured heap</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setEvictionHeapPercentage-float-"><code>setEvictionHeapPercentage(float)</code></a></dd>
</dl>
</li>
</ul>
<a name="setEvictionOffHeapPercentage-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEvictionOffHeapPercentage</h4>
<pre>void&nbsp;setEvictionOffHeapPercentage(float&nbsp;offHeapPercentage)</pre>
<div class="block">Set the percentage of off-heap at or above which the eviction should begin on Regions
configured for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.
<p>
Changing this value may cause eviction to begin immediately.
<p>
Only one change to this attribute or critical off-heap percentage will be allowed at any given
time and its effect will be fully realized before the next change is allowed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offHeapPercentage</code> - a percentage of the maximum off-heap memory available</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the offHeapPercentage value is not &gt;= 0 or &lt;= 100 or
when
greater than the current critical off-heap percentage.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Geode 1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getEvictionOffHeapPercentage--"><code>getEvictionOffHeapPercentage()</code></a>,
<a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#getCriticalOffHeapPercentage--"><code>getCriticalOffHeapPercentage()</code></a></dd>
</dl>
</li>
</ul>
<a name="getEvictionOffHeapPercentage--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getEvictionOffHeapPercentage</h4>
<pre>float&nbsp;getEvictionOffHeapPercentage()</pre>
<div class="block">Get the percentage of off-heap at or above which the eviction should begin on Regions
configured for <a href="../../../../../org/apache/geode/cache/EvictionAttributes.html#createLRUHeapAttributes--">HeapLRU eviction</a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>either the current or recently used percentage of the maximum off-heap memory</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Geode 1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/geode/cache/control/ResourceManager.html#setEvictionOffHeapPercentage-float-"><code>setEvictionOffHeapPercentage(float)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/geode/cache/control/RebalanceResults.html" title="interface in org.apache.geode.cache.control"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/geode/cache/control/RestoreRedundancyOperation.html" title="interface in org.apache.geode.cache.control"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/geode/cache/control/ResourceManager.html" target="_top">Frames</a></li>
<li><a href="ResourceManager.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>