ehcache

net.sf.ehcache.statistics.sampled
Class SampledCacheStatisticsImpl

java.lang.Object
  extended by net.sf.ehcache.statistics.sampled.SampledCacheStatisticsImpl
All Implemented Interfaces:
CacheUsageListener, CacheStatisticsSampler, SampledCacheStatistics

public class SampledCacheStatisticsImpl
extends Object
implements CacheUsageListener, CacheStatisticsSampler

An implementation of SampledCacheStatistics This also implements CacheUsageListener and depends on the notification received from these to update the stats

Since:
1.7
Author:
Abhishek Sanoujam

Field Summary
 
Fields inherited from interface net.sf.ehcache.statistics.sampled.CacheStatisticsSampler
DEFAULT_HISTORY_SIZE, DEFAULT_INTERVAL_SECS, DEFAULT_SEARCH_INTERVAL_SEC
 
Constructor Summary
SampledCacheStatisticsImpl(FailSafeTimer timer)
          The default constructor
SampledCacheStatisticsImpl(FailSafeTimer timer, SampledCounterConfig config)
           
SampledCacheStatisticsImpl(FailSafeTimer timer, SampledCounterConfig config, SampledRateCounterConfig rateGetConfig, SampledRateCounterConfig rateSearchConfig)
          Constructor that accepts a timer which will be used to schedule the sampled counters
 
Method Summary
 void clearStatistics()
          Clears the collected statistics.
 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 getAverageGetTimeNanosMostRecentSample()
          Get most recent value for average time taken for get() operation in the cache
 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
 long getAverageSearchTime()
          Get the average search execution time for searches finishing within the last sample period
 SampledRateCounter getAverageSearchTimeSample()
          Get the SampledRateCounter for average search execution time for searches finishing within the last sample period
 long getCacheElementEvictedMostRecentSample()
          Get most recent value element evicted from cache
 SampledCounter getCacheElementEvictedSample()
          Get the SampledCounter element evicted from cache
 long getCacheElementExpiredMostRecentSample()
          Get most recent value element expired from cache
 SampledCounter getCacheElementExpiredSample()
          Get the SampledCounter element expired from cache
 long getCacheElementPutMostRecentSample()
          Get most recent value element puts in the cache
 SampledCounter getCacheElementPutSample()
          Get the SampledCounter element puts in the cache
 long getCacheElementRemovedMostRecentSample()
          Get most recent value element removed from cache
 SampledCounter getCacheElementRemovedSample()
          Get the SampledCounter element removed from cache
 long getCacheElementUpdatedMostRecentSample()
          Get most recent value element updates , i.e.
 SampledCounter getCacheElementUpdatedSample()
          Get the SampledCounter element updates , i.e.
 long getCacheHitInMemoryMostRecentSample()
          Get most recent value for in-memory cache hit
 SampledCounter getCacheHitInMemorySample()
          Get the SampledCounter for in-memory cache hit
 long getCacheHitMostRecentSample()
          Get most recent value for cache hit
 long getCacheHitOffHeapMostRecentSample()
          Get most recent value for off-heap cache hit
 SampledCounter getCacheHitOffHeapSample()
          Get the SampledCounter for off-heap cache hit
 long getCacheHitOnDiskMostRecentSample()
          Get most recent value for on-disk cache hit
 SampledCounter getCacheHitOnDiskSample()
          Get the SampledCounter for on-disk cache hit
 int getCacheHitRatioMostRecentSample()
          Get most recent value for cache hit ratio
 SampledCounter getCacheHitRatioSample()
          Get the SampledCounter for cache hit ratio
 SampledCounter getCacheHitSample()
          Get the SampledCounter for cache hit
 long getCacheMissExpiredMostRecentSample()
          Get most recent value for cache miss as result of the element getting expired
 SampledCounter getCacheMissExpiredSample()
          Get the SampledCounter for cache miss as result of the element getting expired
 long getCacheMissInMemoryMostRecentSample()
          Get most recent value for in-memory cache miss
 SampledCounter getCacheMissInMemorySample()
          Get the SampledCounter for in-memory cache miss
 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
 SampledCounter getCacheMissNotFoundSample()
          Get the SampledCounter for cache miss as result of the element not found in cache
 long getCacheMissOffHeapMostRecentSample()
          Get most recent value for off-heap cache miss
 SampledCounter getCacheMissOffHeapSample()
          Get the SampledCounter for off-heap cache miss
 long getCacheMissOnDiskMostRecentSample()
          Get most recent value for on-disk cache miss
 SampledCounter getCacheMissOnDiskSample()
          Get the SampledCounter for on-disk cache miss
 SampledCounter getCacheMissSample()
          Get the SampledCounter for cache miss
 long getCacheXaCommitsMostRecentSample()
          Get most recent value of XA commits
 SampledCounter getCacheXaCommitsSample()
          Get the SampledCounter for number of XA Transaction commits that have completed in the interval
 long getCacheXaRollbacksMostRecentSample()
          Get most recent value of XA rollbacks
 SampledCounter getCacheXaRollbacksSample()
          Get the SampledCounter for number of XA Transaction rollbacks that have completed in the interval
 long getSearchesPerSecond()
          Get the number of searches that have finished execution in the last second
 SampledCounter getSearchesPerSecondSample()
          Get the SampledCounter for number of searches that have finished in the interval
 int getStatisticsAccuracy()
          Get value for statisticsAccuracy
 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 notifyCacheHitOffHeap()
          Called on a cache hit in the off-heap store
 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 notifyCacheMissInMemory()
          Called on a cache miss in the MemoryStore
 void notifyCacheMissOffHeap()
          Called on a cache miss in the off-heap store
 void notifyCacheMissOnDisk()
          Called on a cache miss in the DiskStore
 void notifyCacheSearch(long executeTime)
          Called when a search finishes execution
 void notifyGetTimeNanos(long nanos)
          Notified with time taken for a get operation 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 DEPRECATED: use notifyGetTimeNanos(long)
 void notifyXaCommit()
          Called when the Cache's XAResource has been asked to commit
 void notifyXaRollback()
          Called when the Cache's XAResource has been asked to rollback
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampledCacheStatisticsImpl

public SampledCacheStatisticsImpl(FailSafeTimer timer)
The default constructor

Parameters:
timer -

SampledCacheStatisticsImpl

public SampledCacheStatisticsImpl(FailSafeTimer timer,
                                  SampledCounterConfig config)
Parameters:
timer -
config -

SampledCacheStatisticsImpl

public SampledCacheStatisticsImpl(FailSafeTimer timer,
                                  SampledCounterConfig config,
                                  SampledRateCounterConfig rateGetConfig,
                                  SampledRateCounterConfig rateSearchConfig)
Constructor that accepts a timer which will be used to schedule the sampled counters

Method Detail

clearStatistics

public void clearStatistics()
Clears the collected statistics. Resets all counters to zero

Specified by:
clearStatistics in interface SampledCacheStatistics

notifyCacheElementEvicted

public void notifyCacheElementEvicted()
Called when an element is expired in the cache

Specified by:
notifyCacheElementEvicted in interface CacheUsageListener

notifyCacheHitInMemory

public void notifyCacheHitInMemory()
Called on a cache hit in the MemoryStore

Specified by:
notifyCacheHitInMemory in interface CacheUsageListener

notifyCacheHitOffHeap

public void notifyCacheHitOffHeap()
Called on a cache hit in the off-heap store

Specified by:
notifyCacheHitOffHeap in interface CacheUsageListener

notifyCacheHitOnDisk

public void notifyCacheHitOnDisk()
Called on a cache hit in the DiskStore

Specified by:
notifyCacheHitOnDisk in interface CacheUsageListener

notifyCacheMissedWithExpired

public void notifyCacheMissedWithExpired()
Called when an element is found in the cache but already expired

Specified by:
notifyCacheMissedWithExpired in interface CacheUsageListener

notifyCacheMissedWithNotFound

public void notifyCacheMissedWithNotFound()
Called when an element is not found in the cache

Specified by:
notifyCacheMissedWithNotFound in interface CacheUsageListener

notifyCacheMissInMemory

public void notifyCacheMissInMemory()
Called on a cache miss in the MemoryStore

Specified by:
notifyCacheMissInMemory in interface CacheUsageListener

notifyCacheMissOffHeap

public void notifyCacheMissOffHeap()
Called on a cache miss in the off-heap store

Specified by:
notifyCacheMissOffHeap in interface CacheUsageListener

notifyCacheMissOnDisk

public void notifyCacheMissOnDisk()
Called on a cache miss in the DiskStore

Specified by:
notifyCacheMissOnDisk in interface CacheUsageListener

dispose

public void dispose()
Called to dispose off the listener

Specified by:
dispose in interface CacheUsageListener
Specified by:
dispose in interface SampledCacheStatistics

notifyCacheElementExpired

public void notifyCacheElementExpired()
Called when an element in the cache expires

Specified by:
notifyCacheElementExpired in interface CacheUsageListener

notifyCacheElementPut

public void notifyCacheElementPut()
                           throws CacheException
Called when an element is inserted in the cache

Specified by:
notifyCacheElementPut in interface CacheUsageListener
Throws:
CacheException

notifyCacheElementRemoved

public void notifyCacheElementRemoved()
                               throws CacheException
Called when an element is removed from the cache

Specified by:
notifyCacheElementRemoved in interface CacheUsageListener
Throws:
CacheException

notifyCacheElementUpdated

public void notifyCacheElementUpdated()
                               throws CacheException
Called when an element is updated in the cache, i.e. a put for an already existing key

Specified by:
notifyCacheElementUpdated in interface CacheUsageListener
Throws:
CacheException

notifyTimeTakenForGet

public void notifyTimeTakenForGet(long millis)
Notified with time taken for a get operation in the cache DEPRECATED: use notifyGetTimeNanos(long)

Specified by:
notifyTimeTakenForGet in interface CacheUsageListener

notifyGetTimeNanos

public void notifyGetTimeNanos(long nanos)
Description copied from interface: CacheUsageListener
Notified with time taken for a get operation in the cache

Specified by:
notifyGetTimeNanos in interface CacheUsageListener

notifyRemoveAll

public void notifyRemoveAll()
Called when Cache.removeAll() is called

Specified by:
notifyRemoveAll in interface CacheUsageListener

clone

public Object clone()
             throws CloneNotSupportedException

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

notifyStatisticsEnabledChanged

public void notifyStatisticsEnabledChanged(boolean enableStatistics)
Called when statistics is enabled/disabled

Specified by:
notifyStatisticsEnabledChanged in interface CacheUsageListener

notifyStatisticsAccuracyChanged

public void notifyStatisticsAccuracyChanged(int statisticsAccuracyValue)
Notified when the statistics accuracy is changed.

Specified by:
notifyStatisticsAccuracyChanged in interface CacheUsageListener
Parameters:
statisticsAccuracyValue - one of Statistics#STATISTICS_ACCURACY_BEST_EFFORT, Statistics#STATISTICS_ACCURACY_GUARANTEED, Statistics#STATISTICS_ACCURACY_NONE

notifyStatisticsCleared

public void notifyStatisticsCleared()
Called when statistics is cleared

Specified by:
notifyStatisticsCleared in interface CacheUsageListener

getCacheHitMostRecentSample

public long getCacheHitMostRecentSample()
Get most recent value for cache hit

Specified by:
getCacheHitMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache hit count

getAverageGetTimeMostRecentSample

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

Specified by:
getAverageGetTimeMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample of average get time taken for a get operation

getAverageGetTimeNanosMostRecentSample

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

Specified by:
getAverageGetTimeNanosMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample of average get time taken for a get operation

getCacheElementEvictedMostRecentSample

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

Specified by:
getCacheElementEvictedMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for element evicted count

getCacheHitInMemoryMostRecentSample

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

Specified by:
getCacheHitInMemoryMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache hit count in memory

getCacheHitOffHeapMostRecentSample

public long getCacheHitOffHeapMostRecentSample()
Get most recent value for off-heap cache hit

Specified by:
getCacheHitOffHeapMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache hit count in off-heap

getCacheHitOnDiskMostRecentSample

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

Specified by:
getCacheHitOnDiskMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache hit count on disk

getCacheMissExpiredMostRecentSample

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

Specified by:
getCacheMissExpiredMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache miss count and the reason for miss being the element got expired

getCacheMissMostRecentSample

public long getCacheMissMostRecentSample()
Get most recent value for cache miss

Specified by:
getCacheMissMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache miss count

getCacheMissInMemoryMostRecentSample

public long getCacheMissInMemoryMostRecentSample()
Get most recent value for in-memory cache miss

Specified by:
getCacheMissInMemoryMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache miss count in memory

getCacheMissOffHeapMostRecentSample

public long getCacheMissOffHeapMostRecentSample()
Get most recent value for off-heap cache miss

Specified by:
getCacheMissOffHeapMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache miss count in off-heap

getCacheMissOnDiskMostRecentSample

public long getCacheMissOnDiskMostRecentSample()
Get most recent value for on-disk cache miss

Specified by:
getCacheMissOnDiskMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache miss count on disk

getCacheMissNotFoundMostRecentSample

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

Specified by:
getCacheMissNotFoundMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for cache miss not found count

getCacheHitRatioMostRecentSample

public int getCacheHitRatioMostRecentSample()
Get most recent value for cache hit ratio

Specified by:
getCacheHitRatioMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent value for cache hit ratio

getCacheElementExpiredMostRecentSample

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

Specified by:
getCacheElementExpiredMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent value for element expired count

getCacheElementPutMostRecentSample

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

Specified by:
getCacheElementPutMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for number of element puts

getCacheElementRemovedMostRecentSample

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

Specified by:
getCacheElementRemovedMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sample for element removed count

getCacheElementUpdatedMostRecentSample

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

Specified by:
getCacheElementUpdatedMostRecentSample in interface SampledCacheStatistics
Returns:
Most recent sampled value for element update count

getStatisticsAccuracy

public int getStatisticsAccuracy()
Get value for statisticsAccuracy

Specified by:
getStatisticsAccuracy in interface SampledCacheStatistics
Returns:
one of Statistics#STATISTICS_ACCURACY_BEST_EFFORT, Statistics#STATISTICS_ACCURACY_GUARANTEED, Statistics#STATISTICS_ACCURACY_NONE

getCacheHitSample

public SampledCounter getCacheHitSample()
Get the SampledCounter for cache hit

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

getCacheHitInMemorySample

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

Specified by:
getCacheHitInMemorySample in interface CacheStatisticsSampler
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 CacheStatisticsSampler
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 CacheStatisticsSampler
Returns:
the SampledCounter for cache hit count on disk

getCacheMissSample

public SampledCounter getCacheMissSample()
Get the SampledCounter for cache miss

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

getCacheMissInMemorySample

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

Specified by:
getCacheMissInMemorySample in interface CacheStatisticsSampler
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 CacheStatisticsSampler
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 CacheStatisticsSampler
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 CacheStatisticsSampler
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 CacheStatisticsSampler
Returns:
the SampledCounter for cache miss not found count

getCacheHitRatioSample

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

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

getCacheElementEvictedSample

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

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

getCacheElementRemovedSample

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

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

getCacheElementExpiredSample

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

Specified by:
getCacheElementExpiredSample in interface CacheStatisticsSampler
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 CacheStatisticsSampler
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 CacheStatisticsSampler
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 CacheStatisticsSampler
Returns:
the SampledRateCounter of average get time taken for a get operation

getAverageGetTimeNanosSample

public SampledRateCounter getAverageGetTimeNanosSample()
Description copied from interface: CacheStatisticsSampler
Get the SampledRateCounter for average time taken for get() operation in the cache

Specified by:
getAverageGetTimeNanosSample in interface CacheStatisticsSampler
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 CacheStatisticsSampler
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 CacheStatisticsSampler
Returns:
the SampledCounter for number of searches

getStatisticsAccuracyDescription

public String getStatisticsAccuracyDescription()
Get Description for statisticsAccuracy

Specified by:
getStatisticsAccuracyDescription in interface SampledCacheStatistics

isSampledStatisticsEnabled

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

Specified by:
isSampledStatisticsEnabled in interface SampledCacheStatistics
Returns:
true if sampled statistics is enabled, false otherwise

getAverageSearchTime

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

Specified by:
getAverageSearchTime in interface SampledCacheStatistics

getSearchesPerSecond

public long getSearchesPerSecond()
Get the number of searches that have finished execution in the last second

Specified by:
getSearchesPerSecond in interface SampledCacheStatistics

getCacheXaCommitsSample

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

Specified by:
getCacheXaCommitsSample in interface CacheStatisticsSampler
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 CacheStatisticsSampler
Returns:
the SampledCounter for number XA Transaction rollbacks

notifyCacheSearch

public void notifyCacheSearch(long executeTime)
Called when a search finishes execution

Specified by:
notifyCacheSearch in interface CacheUsageListener
Parameters:
executeTime - elapsed time in millis

getCacheXaCommitsMostRecentSample

public long getCacheXaCommitsMostRecentSample()
Get most recent value of XA commits

Specified by:
getCacheXaCommitsMostRecentSample in interface SampledCacheStatistics

notifyXaCommit

public void notifyXaCommit()
Called when the Cache's XAResource has been asked to commit

Specified by:
notifyXaCommit in interface CacheUsageListener

getCacheXaRollbacksMostRecentSample

public long getCacheXaRollbacksMostRecentSample()
Get most recent value of XA rollbacks

Specified by:
getCacheXaRollbacksMostRecentSample in interface SampledCacheStatistics

notifyXaRollback

public void notifyXaRollback()
Called when the Cache's XAResource has been asked to rollback

Specified by:
notifyXaRollback in interface CacheUsageListener

ehcache

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