public class ServerCacheStatistics extends Object
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 and Description |
---|
ServerCacheStatistics() |
Modifier and Type | Method and Description |
---|---|
String |
getCacheName()
Return the name of the cache.
|
long |
getClearCount()
Return the clear count.
|
long |
getEvictByIdle()
Return the count of entries evicted due to idle time.
|
long |
getEvictByLRU()
Return the count of entries evicted due to time least recently used.
|
long |
getEvictByTTL()
Return the count of entries evicted due to time to live.
|
long |
getEvictionRunCount()
Return the eviction run count.
|
long |
getEvictionRunMicros()
Return the eviction run time in micros.
|
long |
getHitCount()
Return the hit count.
|
int |
getHitRatio()
Returns an int from 0 to 100 (percentage) for the hit ratio.
|
long |
getInsertCount()
Return the put insert count.
|
int |
getMaxSize()
Return the maximum size of the cache.
|
long |
getMissCount()
Return the miss count.
|
long |
getRemoveCount()
Return the remove count.
|
int |
getSize()
Return the size of the cache.
|
long |
getUpdateCount()
Return the put update count.
|
void |
setCacheName(String cacheName)
Set the name of the cache.
|
void |
setClearCount(long clearCount)
Set the clear count.
|
void |
setEvictByIdle(long evictByIdle)
Set the count of entries evicted due to idle time.
|
void |
setEvictByLRU(long evictByLRU)
Set the count of entries evicted due to time least recently used.
|
void |
setEvictByTTL(long evictByTTL)
Set the count of entries evicted due to time to live.
|
void |
setEvictionRunCount(long evictCount)
Set the eviction run count.
|
void |
setEvictionRunMicros(long evictionRunMicros)
Set the eviction run time in micros.
|
void |
setHitCount(long hitCount)
Set the hit count.
|
void |
setInsertCount(long insertCount)
Set the put insert count.
|
void |
setMaxSize(int maxSize)
Set the maximum size of the cache.
|
void |
setMissCount(long missCount)
Set the miss count.
|
void |
setRemoveCount(long removeCount)
Set the remove count.
|
void |
setSize(int size)
Set the size of the cache.
|
void |
setUpdateCount(long updateCount)
Set the put update count.
|
String |
toString() |
public ServerCacheStatistics()
public int getHitRatio()
A hit ratio of 100 means every get request against the cache hits an entry.
public String getCacheName()
public void setCacheName(String cacheName)
public long getHitCount()
public void setHitCount(long hitCount)
public long getMissCount()
public void setMissCount(long missCount)
public int getSize()
public void setSize(int size)
public int getMaxSize()
Can be used in conjunction with the size to determine if the cache use is being potentially limited by its maximum size.
public void setMaxSize(int maxSize)
public void setInsertCount(long insertCount)
public long getInsertCount()
public void setUpdateCount(long updateCount)
public long getUpdateCount()
public void setRemoveCount(long removeCount)
public long getRemoveCount()
public void setClearCount(long clearCount)
public long getClearCount()
public void setEvictionRunCount(long evictCount)
public long getEvictionRunCount()
public void setEvictionRunMicros(long evictionRunMicros)
public long getEvictionRunMicros()
public void setEvictByIdle(long evictByIdle)
public long getEvictByIdle()
public void setEvictByTTL(long evictByTTL)
public long getEvictByTTL()
public void setEvictByLRU(long evictByLRU)
public long getEvictByLRU()
Copyright © 2019. All rights reserved.