- 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcacheNameprotected longclearCountprotected longevictCountprotected longgcCountprotected longhitCountprotected longidleCountprotected longlruCountprotected intmaxSizeprotected longmissCountprotected longputCountprotected longremoveCountprotected intsizeprotected longttlCount
-
Constructor Summary
Constructors Constructor Description ServerCacheStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods 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.longgetGcCount()Return the count of entries removed by the garbage collection.longgetHitCount()Return the hit count.intgetHitRatio()Returns an int from 0 to 100 (percentage) for the hit ratio.longgetIdleCount()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.longgetTtlCount()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.voidsetGcCount(long gcCount)Set the count of entries removed by the garbage collection.voidsetHitCount(long hitCount)Set the hit count.voidsetIdleCount(long idleCount)voidsetLruCount(long lruCount)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.voidsetTtlCount(long ttlCount)StringtoString()
-
-
-
Field Detail
-
cacheName
protected String cacheName
-
maxSize
protected int maxSize
-
size
protected int size
-
hitCount
protected long hitCount
-
missCount
protected long missCount
-
putCount
protected long putCount
-
removeCount
protected long removeCount
-
clearCount
protected long clearCount
-
evictCount
protected long evictCount
-
gcCount
protected long gcCount
-
idleCount
protected long idleCount
-
ttlCount
protected long ttlCount
-
lruCount
protected long lruCount
-
-
Method Detail
-
getHitRatio
public int 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
public String getCacheName()
Return the name of the cache.
-
setCacheName
public void setCacheName(String cacheName)
Set the name of the cache.
-
getHitCount
public long getHitCount()
Return the hit count. The number of successful gets.
-
setHitCount
public void setHitCount(long hitCount)
Set the hit count.
-
getMissCount
public long getMissCount()
Return the miss count. The number of gets that returned null.
-
setMissCount
public void setMissCount(long missCount)
Set the miss count.
-
getSize
public int getSize()
Return the size of the cache.
-
setSize
public void setSize(int size)
Set the size of the cache.
-
getMaxSize
public int 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
public void setMaxSize(int maxSize)
Set the maximum size of the cache.
-
setPutCount
public void setPutCount(long putCount)
Set the put insert count.
-
getPutCount
public long getPutCount()
Return the put insert count.
-
setRemoveCount
public void setRemoveCount(long removeCount)
Set the remove count.
-
getRemoveCount
public long getRemoveCount()
Return the remove count.
-
setClearCount
public void setClearCount(long clearCount)
Set the clear count.
-
getClearCount
public long getClearCount()
Return the clear count.
-
setEvictCount
public void setEvictCount(long evictCount)
Set the count of entries evicted due to idle time.
-
getEvictCount
public long getEvictCount()
Return the count of entries evicted due to idle time.
-
setGcCount
public void setGcCount(long gcCount)
Set the count of entries removed by the garbage collection.
-
getGcCount
public long getGcCount()
Return the count of entries removed by the garbage collection.
-
setIdleCount
public void setIdleCount(long idleCount)
-
getIdleCount
public long getIdleCount()
-
setTtlCount
public void setTtlCount(long ttlCount)
-
getTtlCount
public long getTtlCount()
-
setLruCount
public void setLruCount(long lruCount)
-
-