public class SimpleCacheStatistics extends Object implements CacheStatistics
| Constructor and Description |
|---|
SimpleCacheStatistics() |
| Modifier and Type | Method and Description |
|---|---|
long |
getCacheHits()
Get the total number of cache hits.
|
long |
getCacheMisses()
Get the total number of cache misses.
|
long |
getCacheMissesExpired()
Get the number of cache misses where the entry was expired.
|
long |
getCacheMissesNotFound()
Get the number of cache misses where the entry was not found.
|
int |
getCurrentSize()
Get the current size (the number of entries) in the cache.
|
long |
getGetCount()
Get the total get count.
|
float |
getHitRate()
Get the current hit rate, this is a value [0,1] which is the percentage of hits on all get requests.
|
long |
getPutCount()
Get the total put count.
|
void |
increaseCacheHits() |
void |
increaseCacheMissesExpired() |
void |
increaseCacheMissesNotFound() |
void |
increaseGetCount() |
void |
increasePutCount() |
void |
reset()
Reset the statistics.
|
void |
setCacheHits(long cacheHits) |
void |
setCacheMissesExpired(long cacheMissesExpired) |
void |
setCacheMissesNotFound(long cacheMissesNotFound) |
void |
setCurrentSize(int currentSize) |
void |
setGetCount(long getCount) |
void |
setPutCount(long putCount) |
String |
toString() |
public long getCacheHits()
CacheStatisticsgetCacheHits in interface CacheStatisticspublic void setCacheHits(long cacheHits)
public long getCacheMissesNotFound()
CacheStatisticsgetCacheMissesNotFound in interface CacheStatisticspublic void setCacheMissesNotFound(long cacheMissesNotFound)
public long getCacheMissesExpired()
CacheStatisticsgetCacheMissesExpired in interface CacheStatisticspublic void setCacheMissesExpired(long cacheMissesExpired)
public long getPutCount()
CacheStatisticsgetPutCount in interface CacheStatisticspublic void setPutCount(long putCount)
public long getGetCount()
CacheStatisticsgetGetCount in interface CacheStatisticspublic void setGetCount(long getCount)
public void reset()
CacheStatisticsreset in interface CacheStatisticspublic float getHitRate()
CacheStatisticsgetHitRate in interface CacheStatisticspublic long getCacheMisses()
CacheStatisticsgetCacheMisses in interface CacheStatisticspublic int getCurrentSize()
CacheStatisticsgetCurrentSize in interface CacheStatisticspublic void setCurrentSize(int currentSize)
public void increasePutCount()
public void increaseGetCount()
public void increaseCacheMissesNotFound()
public void increaseCacheMissesExpired()
public void increaseCacheHits()
Copyright © 2012. All Rights Reserved.