public class TimeRateAggregator extends Object implements Aggregator
| Constructor and Description |
|---|
TimeRateAggregator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(double value)
Adds the specified value to the storage of the current aggregator.
|
long |
getCount()
Gets the number of aggregated values.
|
long |
getGranularity() |
double |
getResult()
Gets the result of the aggregation using stored values.
|
void |
reset()
Reset the state of the aggregator.
|
void |
setGranularity(long granularity) |
public final long getGranularity()
public final void setGranularity(long granularity)
granularity - the granularity to setpublic long getCount()
AggregatorgetCount in interface Aggregatorpublic double getResult()
AggregatorgetResult in interface Aggregatorpublic void addValue(double value)
AggregatoraddValue in interface Aggregatorvalue - the value to aggregatepublic void reset()
Aggregatorreset in interface AggregatorCopyright © 1998-2022 Apache Software Foundation. All Rights Reserved.