T - Type of object stored in the data series.public class ArrayListBackedAggregator<T> extends AbstractListBackedAggregator<T>
ArrayList.NO_TIMER, TIMER_NAME| Constructor and Description |
|---|
ArrayListBackedAggregator(UnaryFunction<List<T>,T> aggregationFunction)
|
ArrayListBackedAggregator(UnaryFunction<List<T>,T> aggregationFunction,
long interval)
|
ArrayListBackedAggregator(UnaryFunction<List<T>,T> aggregationFunction,
long interval,
boolean useSharedTimer)
Initializes an aggregator with the given function, interval and decides
whether to use the shared timer or own timer.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<T> |
createList()
Creates an instance of
ArrayList and returns it. |
String |
toString() |
doAdd, doEvaluate, doReset, getSeries, retrieveDataSizeadd, addTimerListener, evaluate, finalize, getDataSize, getInterval, isSharedTimer, isTimerEnabled, removeTimerListener, reset, stoppublic ArrayListBackedAggregator(UnaryFunction<List<T>,T> aggregationFunction)
aggregationFunction - Aggregation function to use in AbstractTimedAggregator.evaluate(). Throws
NullPointerException if this is nullpublic ArrayListBackedAggregator(UnaryFunction<List<T>,T> aggregationFunction, long interval)
aggregationFunction - Aggregation function to use in AbstractTimedAggregator.evaluate(). Throws
NullPointerException if this is nullinterval - interval in miliseconds to reset this aggregatorpublic ArrayListBackedAggregator(UnaryFunction<List<T>,T> aggregationFunction, long interval, boolean useSharedTimer)
aggregationFunction - Aggregation function to use in AbstractTimedAggregator.evaluate(). Throws
NullPointerException if this is nullinterval - interval in miliseconds to reset this aggregatoruseSharedTimer - if set to true, it shares a timer across instances as per
AbstractTimedAggregator.AbstractTimedAggregator(long,boolean)
, otherwise this instance will use its private timerprotected List<T> createList()
ArrayList and returns it.createList in class AbstractListBackedAggregator<T>ArrayList (with default initial
capacity as per JDK).public String toString()
toString in class AbstractListBackedAggregator<T>Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.