org.terracotta.statistics.extended
Class ExpiringSampledStatistic<T extends Number>

java.lang.Object
  extended by org.terracotta.statistics.extended.SemiExpiringSampledStatistic<T>
      extended by org.terracotta.statistics.extended.ExpiringSampledStatistic<T>
Type Parameters:
T - statistic type
All Implemented Interfaces:
SampledStatistic<T>, SamplingSupport

public class ExpiringSampledStatistic<T extends Number>
extends SemiExpiringSampledStatistic<T>

Statistic that stops sampling history when the last access is after a user supplied timestamp.

Author:
Chris Dennis

Constructor Summary
ExpiringSampledStatistic(ValueStatistic<T> source, ScheduledExecutorService executor, int historySize, long historyPeriod, TimeUnit historyTimeUnit)
          Creates an expiring statistic.
 
Method Summary
 T value()
          Value.
 
Methods inherited from class org.terracotta.statistics.extended.SemiExpiringSampledStatistic
active, expire, history, setAlwaysOn, start, startStatistic, stopStatistic, touch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpiringSampledStatistic

public ExpiringSampledStatistic(ValueStatistic<T> source,
                                ScheduledExecutorService executor,
                                int historySize,
                                long historyPeriod,
                                TimeUnit historyTimeUnit)
Creates an expiring statistic.

Parameters:
source - statistic source
executor - executor to use for sampling
historySize - size of sample history
historyPeriod - period between samples
Method Detail

value

public T value()
Value.

Specified by:
value in interface SampledStatistic<T extends Number>
Returns:
the t


Copyright © 2016. All Rights Reserved.