org.terracotta.cache.evictor
Class EvictionStatistics

java.lang.Object
  extended by org.terracotta.cache.evictor.EvictionStatistics

public class EvictionStatistics
extends Object

Keeps track of eviction-related statistics.


Constructor Summary
EvictionStatistics()
           
 
Method Summary
 long getEvicted()
          Returns the number of objects that have been evicted.
 long getEvictedMostRecentSample()
          Get the most recent sample of the evicted entries statistic.
 long getExamined()
          Returns the number of objects that have been examined for eviction.
 long getExaminedMostRecentSample()
          Get the most recent sample of the examined entries statistic.
 void increment(long examinedDelta, long evictedDelta)
          Increment the collected statistics data.
 void reset()
          Reset all counters to zero.
 void shutdown()
          Stop sampling the counters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvictionStatistics

public EvictionStatistics()
Method Detail

reset

public void reset()
Reset all counters to zero.


shutdown

public void shutdown()
Stop sampling the counters.


increment

public void increment(long examinedDelta,
                      long evictedDelta)
Increment the collected statistics data.

This method is called by the attached cache implementation, and should not be called directly by the user.

Parameters:
examinedDelta - newly examined elements
evictedDelta - newly evicted elements

getExamined

public long getExamined()
Returns the number of objects that have been examined for eviction.


getExaminedMostRecentSample

public long getExaminedMostRecentSample()
Get the most recent sample of the examined entries statistic.

The value returned is the number of objects examined for eviction in the last second of sampling.


getEvicted

public long getEvicted()
Returns the number of objects that have been evicted.


getEvictedMostRecentSample

public long getEvictedMostRecentSample()
Get the most recent sample of the evicted entries statistic.

The value returned is the number of objects evicted in the last second of sampling.



Copyright © 2015 Terracotta, Inc.. All Rights Reserved.