ehcache

net.sf.ehcache.management.sampled
Class ComprehensiveCacheSamplerImpl

java.lang.Object
  extended by net.sf.ehcache.management.sampled.CacheSamplerImpl
      extended by net.sf.ehcache.management.sampled.ComprehensiveCacheSamplerImpl
All Implemented Interfaces:
CacheConfigurationListener, CacheSampler, ComprehensiveCacheSampler, LiveCacheStatistics, SampledCacheStatistics

public class ComprehensiveCacheSamplerImpl
extends CacheSamplerImpl
implements ComprehensiveCacheSampler

The default implementation of ComprehensiveCacheSampler.

Author:
byoukste

Constructor Summary
ComprehensiveCacheSamplerImpl(Cache cache)
          Constructor that takes a Cache
 
Method Summary
 SampledRateCounter getAverageGetTimeNanosSample()
          Get the SampledRateCounter for average time taken for get() operation in the cache
 SampledRateCounter getAverageGetTimeSample()
          Get the SampledRateCounter for average time taken for get() operation in the cache
 SampledRateCounter getAverageSearchTimeSample()
          Get the SampledRateCounter for average search execution time for searches finishing within the last sample period
 SampledCounter getCacheElementEvictedSample()
          Get the SampledCounter element evicted from cache
 SampledCounter getCacheElementExpiredSample()
          Get the SampledCounter element expired from cache
 SampledCounter getCacheElementPutSample()
          Get the SampledCounter element puts in the cache
 SampledCounter getCacheElementRemovedSample()
          Get the SampledCounter element removed from cache
 SampledCounter getCacheElementUpdatedSample()
          Get the SampledCounter element updates , i.e.
 SampledCounter getCacheHitInMemorySample()
          Get the SampledCounter for in-memory cache hit
 SampledCounter getCacheHitOffHeapSample()
          Get the SampledCounter for off-heap cache hit
 SampledCounter getCacheHitOnDiskSample()
          Get the SampledCounter for on-disk cache hit
 SampledCounter getCacheHitRatioSample()
          Get the SampledCounter for cache hit ratio
 SampledCounter getCacheHitSample()
          Get the SampledCounter for cache hit
 SampledCounter getCacheMissExpiredSample()
          Get the SampledCounter for cache miss as result of the element getting expired
 SampledCounter getCacheMissInMemorySample()
          Get the SampledCounter for in-memory cache miss
 SampledCounter getCacheMissNotFoundSample()
          Get the SampledCounter for cache miss as result of the element not found in cache
 SampledCounter getCacheMissOffHeapSample()
          Get the SampledCounter for off-heap cache miss
 SampledCounter getCacheMissOnDiskSample()
          Get the SampledCounter for on-disk cache miss
 SampledCounter getCacheMissSample()
          Get the SampledCounter for cache miss
 SampledCounter getCacheXaCommitsSample()
          Get the SampledCounter for number of XA Transaction commits that have completed in the interval
 SampledCounter getCacheXaRollbacksSample()
          Get the SampledCounter for number of XA Transaction rollbacks that have completed in the interval
 SampledCounter getSearchesPerSecondSample()
          Get the SampledCounter for number of searches that have finished in the interval
 
Methods inherited from class net.sf.ehcache.management.sampled.CacheSamplerImpl
clearStatistics, deregistered, disableSampledStatistics, disableStatistics, diskCapacityChanged, dispose, enableSampledStatistics, enableStatistics, flush, getAverageGetTimeMillis, getAverageGetTimeMostRecentSample, getAverageGetTimeNanos, getAverageGetTimeNanosMostRecentSample, getAverageSearchTime, getCacheAverageGetTime, getCacheAverageSearchTime, getCacheElementEvictedMostRecentSample, getCacheElementExpiredMostRecentSample, getCacheElementPutMostRecentSample, getCacheElementRemovedMostRecentSample, getCacheElementUpdatedMostRecentSample, getCacheEvictionRate, getCacheExpirationRate, getCacheHitCount, getCacheHitInMemoryMostRecentSample, getCacheHitMostRecentSample, getCacheHitOffHeapMostRecentSample, getCacheHitOnDiskMostRecentSample, getCacheHitRate, getCacheHitRatio, getCacheHitRatioMostRecentSample, getCacheInMemoryHitRate, getCacheInMemoryMissRate, getCacheMissCount, getCacheMissCountExpired, getCacheMissExpiredMostRecentSample, getCacheMissInMemoryMostRecentSample, getCacheMissMostRecentSample, getCacheMissNotFoundMostRecentSample, getCacheMissOffHeapMostRecentSample, getCacheMissOnDiskMostRecentSample, getCacheMissRate, getCacheName, getCacheOffHeapHitRate, getCacheOffHeapMissRate, getCacheOnDiskHitRate, getCacheOnDiskMissRate, getCachePutRate, getCacheRemoveRate, getCacheSearchRate, getCacheUpdateRate, getCacheXaCommitsMostRecentSample, getCacheXaRollbacksMostRecentSample, getDiskExpiryThreadIntervalSeconds, getEvictedCount, getExpiredCount, getHasWriteBehindWriter, getInMemoryHitCount, getInMemoryMissCount, getInMemorySize, getLocalDiskSize, getLocalDiskSizeInBytes, getLocalHeapSize, getLocalHeapSizeInBytes, getLocalOffHeapSize, getLocalOffHeapSizeInBytes, getMaxBytesLocalDisk, getMaxBytesLocalDiskAsString, getMaxBytesLocalHeap, getMaxBytesLocalHeapAsString, getMaxBytesLocalOffHeap, getMaxBytesLocalOffHeapAsString, getMaxElementsOnDisk, getMaxEntriesLocalDisk, getMaxEntriesLocalHeap, getMaxGetTimeMillis, getMaxGetTimeNanos, getMemoryStoreEvictionPolicy, getMinGetTimeMillis, getMinGetTimeNanos, getOffHeapHitCount, getOffHeapMissCount, getOffHeapSize, getOnDiskHitCount, getOnDiskMissCount, getOnDiskSize, getPinnedToStore, getPutCount, getRemovedCount, getSearchable, getSearchesPerSecond, getSize, getStatisticsAccuracy, getStatisticsAccuracyDescription, getStatus, getTerracottaConsistency, getTimeToIdleSeconds, getTimeToLiveSeconds, getTransactional, getTransactionCommitRate, getTransactionRollbackRate, getUpdateCount, getWriterConcurrency, getWriterMaxQueueSize, getWriterQueueLength, getXaCommitCount, getXaRecoveredCount, getXaRollbackCount, isClusterBulkLoadEnabled, isDiskPersistent, isEnabled, isEternal, isLoggingEnabled, isNodeBulkLoadEnabled, isOverflowToDisk, isPinned, isSampledStatisticsEnabled, isStatisticsEnabled, isTerracottaClustered, loggingChanged, maxBytesLocalDiskChanged, maxBytesLocalHeapChanged, memoryCapacityChanged, registered, removeAll, setDiskExpiryThreadIntervalSeconds, setDiskPersistent, setEnabled, setEternal, setLoggingEnabled, setMaxBytesLocalDisk, setMaxBytesLocalDiskAsString, setMaxBytesLocalHeap, setMaxBytesLocalHeapAsString, setMaxElementsOnDisk, setMaxEntriesLocalDisk, setMaxEntriesLocalHeap, setMemoryStoreEvictionPolicy, setNodeBulkLoadEnabled, setOverflowToDisk, setStatisticsEnabled, setTimeToIdleSeconds, setTimeToLiveSeconds, timeToIdleChanged, timeToLiveChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.ehcache.management.sampled.CacheSampler
clearStatistics, disableSampledStatistics, disableStatistics, enableSampledStatistics, enableStatistics, flush, getCacheAverageGetTime, getCacheAverageSearchTime, getCacheEvictionRate, getCacheExpirationRate, getCacheHitRate, getCacheInMemoryHitRate, getCacheInMemoryMissRate, getCacheMissRate, getCacheOffHeapHitRate, getCacheOffHeapMissRate, getCacheOnDiskHitRate, getCacheOnDiskMissRate, getCachePutRate, getCacheRemoveRate, getCacheSearchRate, getCacheUpdateRate, getDiskExpiryThreadIntervalSeconds, getHasWriteBehindWriter, getMaxBytesLocalDisk, getMaxBytesLocalDiskAsString, getMaxBytesLocalHeap, getMaxBytesLocalHeapAsString, getMaxBytesLocalOffHeap, getMaxBytesLocalOffHeapAsString, getMaxElementsOnDisk, getMaxEntriesLocalDisk, getMaxEntriesLocalHeap, getMemoryStoreEvictionPolicy, getPinnedToStore, getSearchable, getStatus, getTerracottaConsistency, getTimeToIdleSeconds, getTimeToLiveSeconds, getTransactional, getTransactionCommitRate, getTransactionRollbackRate, getWriterConcurrency, getWriterMaxQueueSize, getWriterQueueLength, isClusterBulkLoadEnabled, isDiskPersistent, isEnabled, isEternal, isLoggingEnabled, isNodeBulkLoadEnabled, isOverflowToDisk, isPinned, isTerracottaClustered, removeAll, setDiskExpiryThreadIntervalSeconds, setDiskPersistent, setEnabled, setEternal, setLoggingEnabled, setMaxBytesLocalDisk, setMaxBytesLocalDiskAsString, setMaxBytesLocalHeap, setMaxBytesLocalHeapAsString, setMaxElementsOnDisk, setMaxEntriesLocalDisk, setMaxEntriesLocalHeap, setMemoryStoreEvictionPolicy, setNodeBulkLoadEnabled, setOverflowToDisk, setStatisticsEnabled, setTimeToIdleSeconds, setTimeToLiveSeconds
 
Methods inherited from interface net.sf.ehcache.statistics.LiveCacheStatistics
getAverageGetTimeMillis, getAverageGetTimeNanos, getCacheHitCount, getCacheHitRatio, getCacheMissCount, getCacheMissCountExpired, getCacheName, getEvictedCount, getExpiredCount, getInMemoryHitCount, getInMemoryMissCount, getInMemorySize, getLocalDiskSize, getLocalDiskSizeInBytes, getLocalHeapSize, getLocalHeapSizeInBytes, getLocalOffHeapSize, getLocalOffHeapSizeInBytes, getMaxGetTimeMillis, getMaxGetTimeNanos, getMinGetTimeMillis, getMinGetTimeNanos, getOffHeapHitCount, getOffHeapMissCount, getOffHeapSize, getOnDiskHitCount, getOnDiskMissCount, getOnDiskSize, getPutCount, getRemovedCount, getSize, getStatisticsAccuracy, getStatisticsAccuracyDescription, getUpdateCount, getXaCommitCount, getXaRecoveredCount, getXaRollbackCount, isStatisticsEnabled
 
Methods inherited from interface net.sf.ehcache.statistics.sampled.SampledCacheStatistics
dispose, getAverageGetTimeMostRecentSample, getAverageGetTimeNanosMostRecentSample, getAverageSearchTime, getCacheElementEvictedMostRecentSample, getCacheElementExpiredMostRecentSample, getCacheElementPutMostRecentSample, getCacheElementRemovedMostRecentSample, getCacheElementUpdatedMostRecentSample, getCacheHitInMemoryMostRecentSample, getCacheHitMostRecentSample, getCacheHitOffHeapMostRecentSample, getCacheHitOnDiskMostRecentSample, getCacheHitRatioMostRecentSample, getCacheMissExpiredMostRecentSample, getCacheMissInMemoryMostRecentSample, getCacheMissMostRecentSample, getCacheMissNotFoundMostRecentSample, getCacheMissOffHeapMostRecentSample, getCacheMissOnDiskMostRecentSample, getCacheXaCommitsMostRecentSample, getCacheXaRollbacksMostRecentSample, getSearchesPerSecond, getStatisticsAccuracy, getStatisticsAccuracyDescription, isSampledStatisticsEnabled
 

Constructor Detail

ComprehensiveCacheSamplerImpl

public ComprehensiveCacheSamplerImpl(Cache cache)
Constructor that takes a Cache

Parameters:
cache - the Cache that backs this sampler
Method Detail

getCacheHitSample

public SampledCounter getCacheHitSample()
Get the SampledCounter for cache hit

Specified by:
getCacheHitSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache hit count

getCacheHitRatioSample

public SampledCounter getCacheHitRatioSample()
Get the SampledCounter for cache hit ratio

Specified by:
getCacheHitRatioSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache hit ratio

getCacheHitInMemorySample

public SampledCounter getCacheHitInMemorySample()
Get the SampledCounter for in-memory cache hit

Specified by:
getCacheHitInMemorySample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache hit count in memory

getCacheHitOffHeapSample

public SampledCounter getCacheHitOffHeapSample()
Get the SampledCounter for off-heap cache hit

Specified by:
getCacheHitOffHeapSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache hit count in off-heap

getCacheHitOnDiskSample

public SampledCounter getCacheHitOnDiskSample()
Get the SampledCounter for on-disk cache hit

Specified by:
getCacheHitOnDiskSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache hit count on disk

getCacheMissSample

public SampledCounter getCacheMissSample()
Get the SampledCounter for cache miss

Specified by:
getCacheMissSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache miss count

getCacheMissInMemorySample

public SampledCounter getCacheMissInMemorySample()
Get the SampledCounter for in-memory cache miss

Specified by:
getCacheMissInMemorySample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache miss count in memory

getCacheMissOffHeapSample

public SampledCounter getCacheMissOffHeapSample()
Get the SampledCounter for off-heap cache miss

Specified by:
getCacheMissOffHeapSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache miss count in off-heap

getCacheMissOnDiskSample

public SampledCounter getCacheMissOnDiskSample()
Get the SampledCounter for on-disk cache miss

Specified by:
getCacheMissOnDiskSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache miss count on disk

getCacheMissExpiredSample

public SampledCounter getCacheMissExpiredSample()
Get the SampledCounter for cache miss as result of the element getting expired

Specified by:
getCacheMissExpiredSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache miss count and the reason for miss being the element got expired

getCacheMissNotFoundSample

public SampledCounter getCacheMissNotFoundSample()
Get the SampledCounter for cache miss as result of the element not found in cache

Specified by:
getCacheMissNotFoundSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for cache miss not found count

getCacheElementEvictedSample

public SampledCounter getCacheElementEvictedSample()
Get the SampledCounter element evicted from cache

Specified by:
getCacheElementEvictedSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for element evicted count

getCacheElementRemovedSample

public SampledCounter getCacheElementRemovedSample()
Get the SampledCounter element removed from cache

Specified by:
getCacheElementRemovedSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for element removed count

getCacheElementExpiredSample

public SampledCounter getCacheElementExpiredSample()
Get the SampledCounter element expired from cache

Specified by:
getCacheElementExpiredSample in interface ComprehensiveCacheSampler
Returns:
Most recent value for element expired count

getCacheElementPutSample

public SampledCounter getCacheElementPutSample()
Get the SampledCounter element puts in the cache

Specified by:
getCacheElementPutSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for number of element puts

getCacheElementUpdatedSample

public SampledCounter getCacheElementUpdatedSample()
Get the SampledCounter element updates , i.e. put() on elements with already existing keys in the cache

Specified by:
getCacheElementUpdatedSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounterd value for element update count

getAverageGetTimeSample

public SampledRateCounter getAverageGetTimeSample()
Get the SampledRateCounter for average time taken for get() operation in the cache

Specified by:
getAverageGetTimeSample in interface ComprehensiveCacheSampler
Returns:
the SampledRateCounter of average get time taken for a get operation

getAverageGetTimeNanosSample

public SampledRateCounter getAverageGetTimeNanosSample()
Get the SampledRateCounter for average time taken for get() operation in the cache

Specified by:
getAverageGetTimeNanosSample in interface ComprehensiveCacheSampler
Returns:
the SampledRateCounter of average get time taken for a get operation

getAverageSearchTimeSample

public SampledRateCounter getAverageSearchTimeSample()
Get the SampledRateCounter for average search execution time for searches finishing within the last sample period

Specified by:
getAverageSearchTimeSample in interface ComprehensiveCacheSampler
Returns:
the SampledRateCounter of average search time taken

getSearchesPerSecondSample

public SampledCounter getSearchesPerSecondSample()
Get the SampledCounter for number of searches that have finished in the interval

Specified by:
getSearchesPerSecondSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for number of searches

getCacheXaCommitsSample

public SampledCounter getCacheXaCommitsSample()
Get the SampledCounter for number of XA Transaction commits that have completed in the interval

Specified by:
getCacheXaCommitsSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for number XA Transaction commits

getCacheXaRollbacksSample

public SampledCounter getCacheXaRollbacksSample()
Get the SampledCounter for number of XA Transaction rollbacks that have completed in the interval

Specified by:
getCacheXaRollbacksSample in interface ComprehensiveCacheSampler
Returns:
the SampledCounter for number XA Transaction rollbacks

ehcache

Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.