public interface CacheStatistics
Region.getStatistics()
,
Region.Entry.getStatistics()
Modifier and Type | Method and Description |
---|---|
long |
getHitCount()
Returns the number of hits for this region or entry.
|
float |
getHitRatio()
Return the hit ratio, a convenience method defined as the ratio of hits
to the number of calls to
Region.get . |
long |
getLastAccessedTime()
For an entry, returns the last time it was accessed via
Region.get ;
for a region, the last time any of its entries or the entries of its
subregions were accessed with Region.get . |
long |
getLastModifiedTime()
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.
|
long |
getMissCount()
Returns the number of times that
Region.get on
the region or the entry was called and there was no value found
locally. |
void |
resetCounts()
Reset the missCount and hitCount to zero for this entry.
|
long getLastModifiedTime()
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.
Entry and subregion creation will update the modification time on a
region, but destroy
, destroyRegion
,
invalidate
, and invalidateRegion
do not update the modification time.
Region.put(Object, Object)
,
Region.get(Object)
,
Region.create(Object, Object)
,
Region.createSubregion(java.lang.String, com.gemstone.gemfire.cache.RegionAttributes<SK, SV>)
long getLastAccessedTime() throws StatisticsDisabledException
Region.get
;
for a region, the last time any of its entries or the entries of its
subregions were accessed with Region.get
.
Any modifications will also update the lastAccessedTime, so
lastAccessedTime
is always >= lastModifiedTime
.
The lastAccessedTime
on a region is propagated upward to
parent regions, transitively, to the the root region.
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.
StatisticsDisabledException
- if statistics are not availableRegion.get(Object)
,
getLastModifiedTime()
long getMissCount() throws StatisticsDisabledException
Region.get
on
the region or the entry was called and there was no value found
locally. Unlike lastAccessedTime
, the miss count is
not propagated to parent regions. Note that remote operations
such as a "net search" do not effect the miss count.StatisticsDisabledException
- if statistics are not availablelong getHitCount() throws StatisticsDisabledException
Region.get
finds a value locally. Unlike
lastAccessedTime
, the hit count is not propagated to
parent regions. Note that remote operations such as a "net
search" do not effect the hit count.StatisticsDisabledException
- if statistics are not availablefloat getHitRatio() throws StatisticsDisabledException
Region.get
. If there have been zero
calls to Region.get
, then zero is returned.
The hit ratio is equivalent to:
long hitCount = getHitCount(); long total = hitCount + getMissCount(); return total == 0L ? 0.0f : ((float)hitCount / total);
StatisticsDisabledException
- if statistics are not availablevoid resetCounts() throws StatisticsDisabledException
StatisticsDisabledException
- if statistics are not availableCopyright © 1997-2017 Pivotal Software, Inc. All rights reserved.