Package io.ebean.cache
Class ServerCacheStatistics
java.lang.Object
io.ebean.cache.ServerCacheStatistics
public class ServerCacheStatistics extends Object
The statistics collected per cache.
These can be monitored to review the effectiveness of a particular cache.
Depending on the cache implementation not all the statistics may be collected.
-
Constructor Summary
Constructors Constructor Description ServerCacheStatistics() -
Method Summary
Modifier and Type Method Description StringgetCacheName()Return the name of the cache.longgetClearCount()Return the clear count.longgetEvictCount()Return the count of entries evicted due to idle time.longgetHitCount()Return the hit count.intgetHitRatio()Returns an int from 0 to 100 (percentage) for the hit ratio.intgetMaxSize()Return the maximum size of the cache.longgetMissCount()Return the miss count.longgetPutCount()Return the put insert count.longgetRemoveCount()Return the remove count.intgetSize()Return the size of the cache.voidsetCacheName(String cacheName)Set the name of the cache.voidsetClearCount(long clearCount)Set the clear count.voidsetEvictCount(long evictCount)Set the count of entries evicted due to idle time.voidsetHitCount(long hitCount)Set the hit count.voidsetMaxSize(int maxSize)Set the maximum size of the cache.voidsetMissCount(long missCount)Set the miss count.voidsetPutCount(long putCount)Set the put insert count.voidsetRemoveCount(long removeCount)Set the remove count.voidsetSize(int size)Set the size of the cache.StringtoString()
-
Constructor Details
-
ServerCacheStatistics
public ServerCacheStatistics()
-
-
Method Details
-
toString
-
getHitRatio
Returns an int from 0 to 100 (percentage) for the hit ratio.A hit ratio of 100 means every get request against the cache hits an entry.
-
getCacheName
Return the name of the cache. -
setCacheName
Set the name of the cache. -
getHitCount
Return the hit count. The number of successful gets. -
setHitCount
Set the hit count. -
getMissCount
Return the miss count. The number of gets that returned null. -
setMissCount
Set the miss count. -
getSize
Return the size of the cache. -
setSize
Set the size of the cache. -
getMaxSize
Return the maximum size of the cache.Can be used in conjunction with the size to determine if the cache use is being potentially limited by its maximum size.
-
setMaxSize
Set the maximum size of the cache. -
setPutCount
Set the put insert count. -
getPutCount
Return the put insert count. -
setRemoveCount
Set the remove count. -
getRemoveCount
Return the remove count. -
setClearCount
Set the clear count. -
getClearCount
Return the clear count. -
setEvictCount
Set the count of entries evicted due to idle time. -
getEvictCount
Return the count of entries evicted due to idle time.
-