|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.statistics.extended.SemiExpiringSampledStatistic<T>
T - statistic typepublic class SemiExpiringSampledStatistic<T extends Number>
Statistic implementation that stops sampling history if the last history access is before a user supplied timestamp.
| Constructor Summary | |
|---|---|
SemiExpiringSampledStatistic(ValueStatistic<T> source,
ScheduledExecutorService executor,
int historySize,
long historyTime,
TimeUnit historyTimeUnit)
Creates a new semi-expiring statistic. |
|
| Method Summary | |
|---|---|
boolean |
active()
Active. |
boolean |
expire(long expiry)
Expire. |
List<Timestamped<T>> |
history()
History. |
void |
setAlwaysOn(boolean enable)
|
protected void |
start()
Start. |
protected void |
startStatistic()
Start statistic. |
protected void |
stopStatistic()
Stop statistic. |
protected void |
touch()
Touch. |
T |
value()
Value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SemiExpiringSampledStatistic(ValueStatistic<T> source,
ScheduledExecutorService executor,
int historySize,
long historyTime,
TimeUnit historyTimeUnit)
source - statistic sourceexecutor - executor to use for samplinghistorySize - size of sample historyhistoryTime - period between sampleshistoryTimeUnit - unit of period between samples| Method Detail |
|---|
public List<Timestamped<T>> history()
history in interface SampledStatistic<T extends Number>public final boolean active()
SampledStatistic
active in interface SampledStatistic<T extends Number>protected final void touch()
protected final void start()
public final boolean expire(long expiry)
expire in interface SamplingSupportexpiry - the expiry
public void setAlwaysOn(boolean enable)
setAlwaysOn in interface SamplingSupportprotected void stopStatistic()
protected void startStatistic()
public T value()
value in interface SampledStatistic<T extends Number>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||