public class AggregatorRate extends Object implements AggregationMethod
Modifier and Type | Field and Description |
---|---|
protected double |
accumulator |
protected boolean |
isSet |
protected long |
latest |
protected long |
oldest |
protected long |
oneSecondTime |
Constructor and Description |
---|
AggregatorRate(long oneSecondTime) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear out the collection.
|
void |
enter(Object value)
Apply the value as entering aggregation (entering window).
|
protected void |
enterValueArr(Object[] parameters) |
protected void |
enterValueSingle(Object value) |
double |
getAccumulator() |
long |
getLatest() |
long |
getOldest() |
long |
getOneSecondTime() |
Object |
getValue()
Returns the current value held.
|
boolean |
isSet() |
void |
leave(Object value)
Apply the value as leaving aggregation (leaving window).
|
protected void |
leaveValueArr(Object[] parameters) |
protected void |
leaveValueSingle(Object value) |
void |
setAccumulator(double accumulator) |
void |
setLatest(long latest) |
void |
setOldest(long oldest) |
void |
setSet(boolean set) |
protected final long oneSecondTime
protected double accumulator
protected long latest
protected long oldest
protected boolean isSet
public void enter(Object value)
AggregationMethod
The value can be null since 'null' values may be counted as unique separate values.
enter
in interface AggregationMethod
value
- to add to aggregatepublic void leave(Object value)
AggregationMethod
The value can be null since 'null' values may be counted as unique separate values.
leave
in interface AggregationMethod
value
- to remove from aggregatepublic Object getValue()
AggregationMethod
getValue
in interface AggregationMethod
public void clear()
AggregationMethod
clear
in interface AggregationMethod
public long getOneSecondTime()
public double getAccumulator()
public void setAccumulator(double accumulator)
public long getLatest()
public void setLatest(long latest)
public long getOldest()
public void setOldest(long oldest)
public boolean isSet()
public void setSet(boolean set)
protected void enterValueSingle(Object value)
protected void enterValueArr(Object[] parameters)
protected void leaveValueArr(Object[] parameters)
protected void leaveValueSingle(Object value)