|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.statistics.sampled.SampledCacheStatisticsImpl
public class SampledCacheStatisticsImpl
An implementation of SampledCacheStatistics
This also implements CacheUsageListener
and depends on the notification
received from
these to update the stats
Constructor Summary | |
---|---|
SampledCacheStatisticsImpl(FailSafeTimer timer)
Constructor that accepts a timer which will be used to schedule the sampled counters |
Method Summary | |
---|---|
void |
clearStatistics()
Clears the collected statistics. |
java.lang.Object |
clone()
|
void |
dispose()
Called to dispose off the listener |
long |
getAverageGetTimeMostRecentSample()
Get most recent value for average time taken for get() operation in the cache |
long |
getCacheElementEvictedMostRecentSample()
Get most recent value element evicted from cache |
long |
getCacheElementExpiredMostRecentSample()
Get most recent value element expired from cache |
long |
getCacheElementPutMostRecentSample()
Get most recent value element puts in the cache |
long |
getCacheElementRemovedMostRecentSample()
Get most recent value element removed from cache |
long |
getCacheElementUpdatedMostRecentSample()
Get most recent value element updates , i.e. |
long |
getCacheHitInMemoryMostRecentSample()
Get most recent value for in-memory cache hit |
long |
getCacheHitMostRecentSample()
Get most recent value for cache hit |
long |
getCacheHitOnDiskMostRecentSample()
Get most recent value for on-disk cache hit |
long |
getCacheMissExpiredMostRecentSample()
Get most recent value for cache miss as result of the element getting expired |
long |
getCacheMissMostRecentSample()
Get most recent value for cache miss |
long |
getCacheMissNotFoundMostRecentSample()
Get most recent value for cache miss as result of the element not found in cache |
int |
getStatisticsAccuracy()
Get value for statisticsAccuracy |
java.lang.String |
getStatisticsAccuracyDescription()
Get Description for statisticsAccuracy |
boolean |
isSampledStatisticsEnabled()
Returns true if statistics collection is enabled for cache, otherwise false |
void |
notifyCacheElementEvicted()
Called when an element is expired in the cache |
void |
notifyCacheElementExpired()
Called when an element in the cache expires |
void |
notifyCacheElementPut()
Called when an element is inserted in the cache |
void |
notifyCacheElementRemoved()
Called when an element is removed from the cache |
void |
notifyCacheElementUpdated()
Called when an element is updated in the cache, i.e. |
void |
notifyCacheHitInMemory()
Called on a cache hit in the MemoryStore |
void |
notifyCacheHitOnDisk()
Called on a cache hit in the DiskStore |
void |
notifyCacheMissedWithExpired()
Called when an element is found in the cache but already expired |
void |
notifyCacheMissedWithNotFound()
Called when an element is not found in the cache |
void |
notifyRemoveAll()
Called when Cache.removeAll() is called |
void |
notifyStatisticsAccuracyChanged(int statisticsAccuracyValue)
Notified when the statistics accuracy is changed. |
void |
notifyStatisticsCleared()
Called when statistics is cleared |
void |
notifyStatisticsEnabledChanged(boolean enableStatistics)
Called when statistics is enabled/disabled |
void |
notifyTimeTakenForGet(long millis)
Notified with time taken for a get operation in the cache |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SampledCacheStatisticsImpl(FailSafeTimer timer)
Method Detail |
---|
public void clearStatistics()
clearStatistics
in interface SampledCacheStatistics
public void notifyCacheElementEvicted()
notifyCacheElementEvicted
in interface CacheUsageListener
public void notifyCacheHitInMemory()
notifyCacheHitInMemory
in interface CacheUsageListener
public void notifyCacheHitOnDisk()
notifyCacheHitOnDisk
in interface CacheUsageListener
public void notifyCacheMissedWithExpired()
notifyCacheMissedWithExpired
in interface CacheUsageListener
public void notifyCacheMissedWithNotFound()
notifyCacheMissedWithNotFound
in interface CacheUsageListener
public void dispose()
dispose
in interface CacheUsageListener
dispose
in interface SampledCacheStatistics
public void notifyCacheElementExpired()
notifyCacheElementExpired
in interface CacheUsageListener
public void notifyCacheElementPut() throws CacheException
notifyCacheElementPut
in interface CacheUsageListener
CacheException
public void notifyCacheElementRemoved() throws CacheException
notifyCacheElementRemoved
in interface CacheUsageListener
CacheException
public void notifyCacheElementUpdated() throws CacheException
notifyCacheElementUpdated
in interface CacheUsageListener
CacheException
public void notifyTimeTakenForGet(long millis)
notifyTimeTakenForGet
in interface CacheUsageListener
public void notifyRemoveAll()
notifyRemoveAll
in interface CacheUsageListener
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void notifyStatisticsEnabledChanged(boolean enableStatistics)
notifyStatisticsEnabledChanged
in interface CacheUsageListener
public void notifyStatisticsAccuracyChanged(int statisticsAccuracyValue)
notifyStatisticsAccuracyChanged
in interface CacheUsageListener
statisticsAccuracyValue
- one of Statistics#STATISTICS_ACCURACY_BEST_EFFORT,
Statistics#STATISTICS_ACCURACY_GUARANTEED,
Statistics#STATISTICS_ACCURACY_NONEpublic void notifyStatisticsCleared()
notifyStatisticsCleared
in interface CacheUsageListener
public long getCacheHitMostRecentSample()
getCacheHitMostRecentSample
in interface SampledCacheStatistics
public long getAverageGetTimeMostRecentSample()
getAverageGetTimeMostRecentSample
in interface SampledCacheStatistics
public long getCacheElementEvictedMostRecentSample()
getCacheElementEvictedMostRecentSample
in interface SampledCacheStatistics
public long getCacheHitInMemoryMostRecentSample()
getCacheHitInMemoryMostRecentSample
in interface SampledCacheStatistics
public long getCacheHitOnDiskMostRecentSample()
getCacheHitOnDiskMostRecentSample
in interface SampledCacheStatistics
public long getCacheMissExpiredMostRecentSample()
getCacheMissExpiredMostRecentSample
in interface SampledCacheStatistics
public long getCacheMissMostRecentSample()
getCacheMissMostRecentSample
in interface SampledCacheStatistics
public long getCacheMissNotFoundMostRecentSample()
getCacheMissNotFoundMostRecentSample
in interface SampledCacheStatistics
public long getCacheElementExpiredMostRecentSample()
getCacheElementExpiredMostRecentSample
in interface SampledCacheStatistics
public long getCacheElementPutMostRecentSample()
getCacheElementPutMostRecentSample
in interface SampledCacheStatistics
public long getCacheElementRemovedMostRecentSample()
getCacheElementRemovedMostRecentSample
in interface SampledCacheStatistics
public long getCacheElementUpdatedMostRecentSample()
getCacheElementUpdatedMostRecentSample
in interface SampledCacheStatistics
public int getStatisticsAccuracy()
getStatisticsAccuracy
in interface SampledCacheStatistics
public java.lang.String getStatisticsAccuracyDescription()
getStatisticsAccuracyDescription
in interface SampledCacheStatistics
public boolean isSampledStatisticsEnabled()
isSampledStatisticsEnabled
in interface SampledCacheStatistics
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |