T
- statistic typepublic class SemiExpiringStatistic<T extends Number> extends Object
Constructor and Description |
---|
SemiExpiringStatistic(org.terracotta.statistics.ValueStatistic<T> source,
ScheduledExecutorService executor,
int historySize,
long historyNanos)
Creates a new semi-expiring statistic.
|
Modifier and Type | Method and Description |
---|---|
boolean |
active()
Active.
|
protected boolean |
expire(long expiry)
Expire.
|
List<org.terracotta.statistics.archive.Timestamped<T>> |
history()
History.
|
protected void |
start()
Start.
|
protected void |
startStatistic()
Start statistic.
|
protected void |
stopStatistic()
Stop statistic.
|
protected void |
touch()
Touch.
|
T |
value()
Value.
|
public SemiExpiringStatistic(org.terracotta.statistics.ValueStatistic<T> source, ScheduledExecutorService executor, int historySize, long historyNanos)
source
- statistic sourceexecutor
- executor to use for samplinghistorySize
- size of sample historyhistoryNanos
- period between samplespublic List<org.terracotta.statistics.archive.Timestamped<T>> history()
history
in interface ExtendedStatistics.Statistic<T extends Number>
public final boolean active()
ExtendedStatistics.Statistic
protected final void touch()
protected final void start()
protected final boolean expire(long expiry)
expiry
- the expiryprotected void stopStatistic()
protected void startStatistic()
public T value()
value
in interface ExtendedStatistics.Statistic<T extends Number>
Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.