Top Fields Constructors Methods
org.terracotta.statistics

public Class SampledStatisticAdapter<T extends java.io.Serializable>

extends Object
implements SampledStatistic<T extends Serializable>
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.SampledStatistic, org.terracotta.statistics.ValueStatistic
Imports
java.io.Serializable, java.util.Collections, .List, .Objects, java.util.function.LongSupplier

Author
Mathieu Carbou

Field Summary

Modifier and TypeField and Description
private final ValueStatistic<T>
private final LongSupplier

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public List<Sample<T>>
public List<Sample<T>>
history(long
starting point of history in ms
since
)

Implements org.terracotta.statistics.SampledStatistic.history.

The history of values, since a given time in ms
public static <T extends Serializable> SampledStatistic<T>
sample(ValueStatistic<T> accessor, LongSupplier timeSource)

public StatisticType
public T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

statisticback to summary
private final ValueStatistic<T> statistic
timeSourceback to summary
private final LongSupplier timeSource

Constructor Detail

SampledStatisticAdapterback to summary
private SampledStatisticAdapter(ValueStatistic<T> statistic, LongSupplier timeSource)

Method Detail

historyback to summary
public List<Sample<T>> history()

Implements org.terracotta.statistics.SampledStatistic.history.

Doc from org.terracotta.statistics.SampledStatistic.history.

The history of values

Returns:List<Sample<T>>

the list

Annotations
@Override
historyback to summary
public List<Sample<T>> history(long since)

Implements org.terracotta.statistics.SampledStatistic.history.

Doc from org.terracotta.statistics.SampledStatistic.history.

The history of values, since a given time in ms

Parameters
since:long

starting point of history in ms

Returns:List<Sample<T>>

the list

Annotations
@Override
sampleback to summary
public static <T extends Serializable> SampledStatistic<T> sample(ValueStatistic<T> accessor, LongSupplier timeSource)
typeback to summary
public StatisticType type()

Implements org.terracotta.statistics.ValueStatistic.type.

Returns:StatisticType

Doc from org.terracotta.statistics.ValueStatistic.type.

The statistic type

Annotations
@Override
valueback to summary
public T value()

Implements org.terracotta.statistics.ValueStatistic.value.

Returns:T

Doc from org.terracotta.statistics.ValueStatistic.value.

The current statistic value

Annotations
@Override