ehcache

net.sf.ehcache.statistics.sampled
Interface SampledCacheStatistics

All Known Subinterfaces:
SampledCacheMBean
All Known Implementing Classes:
NullSampledCacheStatistics, SampledCache, SampledCacheStatisticsImpl, SampledCacheStatisticsWrapper

public interface SampledCacheStatistics

Interface for sampled usage statistics of a Cache

Since:
1.7
Author:
Abhishek Sanoujam

Method Summary
 void clearStatistics()
          Clears sampled statistics for this cache
 void dispose()
          Method used to dispose this statistics
 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
 

Method Detail

getCacheHitMostRecentSample

long getCacheHitMostRecentSample()
Get most recent value for cache hit

Returns:
Most recent sample for cache hit count

getCacheHitInMemoryMostRecentSample

long getCacheHitInMemoryMostRecentSample()
Get most recent value for in-memory cache hit

Returns:
Most recent sample for cache hit count in memory

getCacheHitOnDiskMostRecentSample

long getCacheHitOnDiskMostRecentSample()
Get most recent value for on-disk cache hit

Returns:
Most recent sample for cache hit count on disk

getCacheMissMostRecentSample

long getCacheMissMostRecentSample()
Get most recent value for cache miss

Returns:
Most recent sample for cache miss count

getCacheMissExpiredMostRecentSample

long getCacheMissExpiredMostRecentSample()
Get most recent value for cache miss as result of the element getting expired

Returns:
Most recent sample for cache miss count and the reason for miss being the element got expired

getCacheMissNotFoundMostRecentSample

long getCacheMissNotFoundMostRecentSample()
Get most recent value for cache miss as result of the element not found in cache

Returns:
Most recent sample for cache miss not found count

getCacheElementEvictedMostRecentSample

long getCacheElementEvictedMostRecentSample()
Get most recent value element evicted from cache

Returns:
Most recent sample for element evicted count

getCacheElementRemovedMostRecentSample

long getCacheElementRemovedMostRecentSample()
Get most recent value element removed from cache

Returns:
Most recent sample for element removed count

getCacheElementExpiredMostRecentSample

long getCacheElementExpiredMostRecentSample()
Get most recent value element expired from cache

Returns:
Most recent value for element expired count

getCacheElementPutMostRecentSample

long getCacheElementPutMostRecentSample()
Get most recent value element puts in the cache

Returns:
Most recent sample for number of element puts

getCacheElementUpdatedMostRecentSample

long getCacheElementUpdatedMostRecentSample()
Get most recent value element updates , i.e. put() on elements with already existing keys in the cache

Returns:
Most recent sampled value for element update count

getAverageGetTimeMostRecentSample

long getAverageGetTimeMostRecentSample()
Get most recent value for average time taken for get() operation in the cache

Returns:
Most recent sample of average get time taken for a get operation

getStatisticsAccuracy

int getStatisticsAccuracy()
Get value for statisticsAccuracy

Returns:
one of Statistics#STATISTICS_ACCURACY_BEST_EFFORT, Statistics#STATISTICS_ACCURACY_GUARANTEED, Statistics#STATISTICS_ACCURACY_NONE

getStatisticsAccuracyDescription

java.lang.String getStatisticsAccuracyDescription()
Get Description for statisticsAccuracy


isSampledStatisticsEnabled

boolean isSampledStatisticsEnabled()
Returns true if statistics collection is enabled for cache, otherwise false

Returns:
true if sampled statistics is enabled, false otherwise

dispose

void dispose()
Method used to dispose this statistics


clearStatistics

void clearStatistics()
Clears sampled statistics for this cache


ehcache

true