Top Fields Constructors Methods
org.terracotta.statistics

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

extends Object
implements ValueStatistic<T extends Serializable>
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.ValueStatistic
Imports
java.io.Serializable, java.util.concurrent.TimeUnit, java.util.concurrent.atomic.AtomicLong, .AtomicReference

Author
Mathieu Carbou

Field Summary

Modifier and TypeField and Description
private final long
private final ValueStatistic<T>
private final AtomicLong
private final AtomicReference<T>

Constructor Summary

AccessConstructor and Description
public
MemoizingValueStatistic(long delay, TimeUnit unit, ValueStatistic<T> delegate)

Method Summary

Modifier and TypeMethod and Description
public StatisticType
public T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delayNsback to summary
private final long delayNs
delegateback to summary
private final ValueStatistic<T> delegate
expirationback to summary
private final AtomicLong expiration
memoizedback to summary
private final AtomicReference<T> memoized

Constructor Detail

MemoizingValueStatisticback to summary
public MemoizingValueStatistic(long delay, TimeUnit unit, ValueStatistic<T> delegate)

Method Detail

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