| <!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 (1.8.0_272) on Thu Nov 12 16:27:22 PST 2020 --> |
| <title>CacheStatistics (Apache Geode 1.13.1)</title> |
| <meta name="date" content="2020-11-12"> |
| <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="CacheStatistics (Apache Geode 1.13.1)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":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/CacheRuntimeException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/geode/cache/CacheTransactionManager.html" title="interface in org.apache.geode.cache"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/geode/cache/CacheStatistics.html" target="_top">Frames</a></li> |
| <li><a href="CacheStatistics.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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</div> |
| <h2 title="Interface CacheStatistics" class="title">Interface CacheStatistics</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">CacheStatistics</span></pre> |
| <div class="block">Defines common statistics information for both region and entries. All of these methods may throw |
| a CacheClosedException, RegionDestroyedException or an EntryDestroyedException.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 2.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/geode/cache/Region.html#getStatistics--"><code>Region.getStatistics()</code></a>, |
| <a href="../../../../org/apache/geode/cache/Region.Entry.html#getStatistics--"><code>Region.Entry.getStatistics()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheStatistics.html#getHitCount--">getHitCount</a></span>()</code> |
| <div class="block">Returns the number of hits for this region or entry.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>float</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheStatistics.html#getHitRatio--">getHitRatio</a></span>()</code> |
| <div class="block">Return the hit ratio, a convenience method defined as the ratio of hits to the number of calls |
| to <a href="../../../../org/apache/geode/cache/Region.html#get-java.lang.Object-"><code>Region.get</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheStatistics.html#getLastAccessedTime--">getLastAccessedTime</a></span>()</code> |
| <div class="block">For an entry, returns the last time it was accessed via <code>Region.get</code>; for a region, |
| the last time any of its entries or the entries of its subregions were accessed with |
| <code>Region.get</code>.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheStatistics.html#getLastModifiedTime--">getLastModifiedTime</a></span>()</code> |
| <div class="block">For an entry, returns the time that the entry's value was last modified; for a region, the last |
| time any of the region's entries' values or the values in subregions' entries were modified.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheStatistics.html#getMissCount--">getMissCount</a></span>()</code> |
| <div class="block">Returns the number of times that <a href="../../../../org/apache/geode/cache/Region.html#get-java.lang.Object-"><code>Region.get</code></a> on the region or the |
| entry was called and there was no value found locally.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheStatistics.html#resetCounts--">resetCounts</a></span>()</code> |
| <div class="block">Reset the missCount and hitCount to zero for this entry.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getLastModifiedTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastModifiedTime</h4> |
| <pre>long getLastModifiedTime()</pre> |
| <div class="block">For an entry, returns the time that the entry's value was last modified; for a region, the last |
| time any of the region's entries' values or the values in subregions' entries were modified. |
| The modification may have been initiated locally or it may have been an update distributed from |
| another cache. It may also have been a new value provided by a loader. The modification time on |
| a region is propagated upward to parent regions, transitively, to the root region. |
| <p> |
| The number is expressed as the number of milliseconds since January 1, 1970. The granularity |
| may be as course as 100ms, so the accuracy may be off by up to 50ms. |
| <p> |
| Entry and subregion creation will update the modification time on a region, but |
| <code>destroy</code>, <code>destroyRegion</code>, <code>invalidate</code>, and |
| <code>invalidateRegion</code> do not update the modification time.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the last modification time of the region or the entry; returns 0 if entry is invalid or |
| modification time is uninitialized.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/geode/cache/Region.html#put-K-V-"><code>Region.put(Object, Object)</code></a>, |
| <a href="../../../../org/apache/geode/cache/Region.html#get-java.lang.Object-"><code>Region.get(Object)</code></a>, |
| <a href="../../../../org/apache/geode/cache/Region.html#create-K-V-"><code>Region.create(Object, Object)</code></a>, |
| <a href="../../../../org/apache/geode/cache/Region.html#createSubregion-java.lang.String-org.apache.geode.cache.RegionAttributes-"><code>Region.createSubregion(java.lang.String, org.apache.geode.cache.RegionAttributes<SK, SV>)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLastAccessedTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastAccessedTime</h4> |
| <pre>long getLastAccessedTime() |
| throws <a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></pre> |
| <div class="block">For an entry, returns the last time it was accessed via <code>Region.get</code>; for a region, |
| the last time any of its entries or the entries of its subregions were accessed with |
| <code>Region.get</code>. Any modifications will also update the lastAccessedTime, so |
| <code>lastAccessedTime</code> is always <code>>= lastModifiedTime</code>. The |
| <code>lastAccessedTime</code> on a region is propagated upward to parent regions, transitively, |
| to the the root region. |
| <p> |
| The number is expressed as the number of milliseconds since January 1, 1970. The granularity |
| may be as course as 100ms, so the accuracy may be off by up to 50ms.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the last access time of the region or the entry's value; returns 0 if entry is invalid |
| or access time is uninitialized.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></code> - if statistics are not available</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/geode/cache/Region.html#get-java.lang.Object-"><code>Region.get(Object)</code></a>, |
| <a href="../../../../org/apache/geode/cache/CacheStatistics.html#getLastModifiedTime--"><code>getLastModifiedTime()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMissCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMissCount</h4> |
| <pre>long getMissCount() |
| throws <a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></pre> |
| <div class="block">Returns the number of times that <a href="../../../../org/apache/geode/cache/Region.html#get-java.lang.Object-"><code>Region.get</code></a> on the region or the |
| entry was called and there was no value found locally. Unlike <code>lastAccessedTime</code>, |
| the miss count is not propagated to parent regions. Note that remote operations such as a "net |
| search" do not effect the miss count.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of cache misses on the region or the entry.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></code> - if statistics are not available</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHitCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHitCount</h4> |
| <pre>long getHitCount() |
| throws <a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></pre> |
| <div class="block">Returns the number of hits for this region or entry. The number of hits is defined as the |
| number of times when the <a href="../../../../org/apache/geode/cache/Region.html#get-java.lang.Object-"><code>Region.get</code></a> finds a value locally. Unlike |
| <code>lastAccessedTime</code>, the hit count is not propagated to parent regions. Note that |
| remote operations such as a "net search" do not effect the hit count.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of hits for this region or entry.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></code> - if statistics are not available</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHitRatio--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHitRatio</h4> |
| <pre>float getHitRatio() |
| throws <a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></pre> |
| <div class="block">Return the hit ratio, a convenience method defined as the ratio of hits to the number of calls |
| to <a href="../../../../org/apache/geode/cache/Region.html#get-java.lang.Object-"><code>Region.get</code></a>. If there have been zero calls to |
| <code>Region.get</code>, then zero is returned. |
| <p> |
| The hit ratio is equivalent to: |
| |
| <pre> |
| long hitCount = getHitCount(); |
| long total = hitCount + getMissCount(); |
| return total == 0L ? 0.0f : ((float) hitCount / total); |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the hit ratio as a float</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></code> - if statistics are not available</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="resetCounts--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>resetCounts</h4> |
| <pre>void resetCounts() |
| throws <a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></pre> |
| <div class="block">Reset the missCount and hitCount to zero for this entry.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></code> - if statistics are not available</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/CacheRuntimeException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/geode/cache/CacheTransactionManager.html" title="interface in org.apache.geode.cache"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/geode/cache/CacheStatistics.html" target="_top">Frames</a></li> |
| <li><a href="CacheStatistics.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |