Package org.terracotta.statistics
Class SampledStatisticAdapter<T extends Serializable>
- java.lang.Object
-
- org.terracotta.statistics.SampledStatisticAdapter<T>
-
- All Implemented Interfaces:
SampledStatistic<T>,ValueStatistic<T>
public class SampledStatisticAdapter<T extends Serializable> extends Object implements SampledStatistic<T>
- Author:
- Mathieu Carbou
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Sample<T>>history()The history of valuesList<Sample<T>>history(long since)The history of values, since a given time in msstatic <T extends Serializable>
SampledStatistic<T>sample(ValueStatistic<T> accessor, LongSupplier timeSource)StatisticTypetype()Tvalue()
-
-
-
Method Detail
-
value
public T value()
- Specified by:
valuein interfaceValueStatistic<T extends Serializable>- Returns:
- The current statistic value
-
history
public List<Sample<T>> history()
Description copied from interface:SampledStatisticThe history of values- Specified by:
historyin interfaceSampledStatistic<T extends Serializable>- Returns:
- the list
-
history
public List<Sample<T>> history(long since)
Description copied from interface:SampledStatisticThe history of values, since a given time in ms- Specified by:
historyin interfaceSampledStatistic<T extends Serializable>- Parameters:
since- starting point of history in ms- Returns:
- the list
-
type
public StatisticType type()
- Specified by:
typein interfaceValueStatistic<T extends Serializable>- Returns:
- The statistic type
-
sample
public static <T extends Serializable> SampledStatistic<T> sample(ValueStatistic<T> accessor, LongSupplier timeSource)
-
-