|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.statistics.extended.RateImpl<T>
T - the generic typepublic class RateImpl<T extends Enum<T>>
The Class RateStatistic.
| Constructor Summary | |
|---|---|
RateImpl(OperationStatistic<T> source,
Set<T> targets,
long averagePeriod,
TimeUnit averageTimeUnit,
ScheduledExecutorService executor,
int historySize,
long historyPeriod,
TimeUnit historyTimeUnit)
Instantiates a new rate statistic. |
|
| Method Summary | |
|---|---|
boolean |
active()
Active. |
protected boolean |
expire(long expiry)
Check the statistic for expiry. |
List<Timestamped<Double>> |
history()
History. |
protected void |
setHistory(int historySize,
long historyPeriod,
TimeUnit historyTimeUnit)
Set the sample history parameters. |
protected void |
setWindow(long averagePeriod,
TimeUnit averageTimeUnit)
Sets the window. |
protected void |
start()
Start sampling. |
Double |
value()
Value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RateImpl(OperationStatistic<T> source,
Set<T> targets,
long averagePeriod,
TimeUnit averageTimeUnit,
ScheduledExecutorService executor,
int historySize,
long historyPeriod,
TimeUnit historyTimeUnit)
targets - the targetsaveragePeriod - the average periodexecutor - the executorhistorySize - the history sizehistoryPeriod - the history period| Method Detail |
|---|
public boolean active()
SampledStatistic
active in interface SampledStatistic<Double>public Double value()
SampledStatistic
value in interface SampledStatistic<Double>public List<Timestamped<Double>> history()
SampledStatistic
history in interface SampledStatistic<Double>protected void start()
protected void setWindow(long averagePeriod,
TimeUnit averageTimeUnit)
averagePeriod - the new windowaverageTimeUnit - the new window's time unit
protected void setHistory(int historySize,
long historyPeriod,
TimeUnit historyTimeUnit)
historySize - history sample sizehistoryPeriod - history sample periodhistoryTimeUnit - history time unitprotected boolean expire(long expiry)
expiry - expiry threshold
true if expired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||