Package org.terracotta.statistics
Class MemoizingValueStatistic<T extends Serializable>
java.lang.Object
org.terracotta.statistics.MemoizingValueStatistic<T>
- All Implemented Interfaces:
ValueStatistic<T>
public class MemoizingValueStatistic<T extends Serializable>
extends Object
implements ValueStatistic<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate final ValueStatistic<T>private final AtomicLongprivate final AtomicReference<T> -
Constructor Summary
ConstructorsConstructorDescriptionMemoizingValueStatistic(long delay, TimeUnit unit, ValueStatistic<T> delegate) -
Method Summary
-
Field Details
-
delayNs
private final long delayNs -
memoized
-
expiration
-
delegate
-
-
Constructor Details
-
MemoizingValueStatistic
-
-
Method Details
-
type
- Specified by:
typein interfaceValueStatistic<T extends Serializable>- Returns:
- The statistic type
-
value
- Specified by:
valuein interfaceValueStatistic<T extends Serializable>- Returns:
- The current statistic value
-