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(Function<List<T>,T> aggregationFunction)
|
ArrayListBackedAggregator(Function<List<T>,T> aggregationFunction,
long interval)
|
ArrayListBackedAggregator(Function<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, retrieveDataSize
add, addTimerListener, evaluate, finalize, getDataSize, getInterval, isSharedTimer, isTimerEnabled, removeTimerListener, reset, stop
public ArrayListBackedAggregator(Function<List<T>,T> aggregationFunction)
aggregationFunction
- Aggregation function to use in AbstractTimedAggregator.evaluate()
. Throws
NullPointerException
if this is null
public ArrayListBackedAggregator(Function<List<T>,T> aggregationFunction, long interval)
aggregationFunction
- Aggregation function to use in AbstractTimedAggregator.evaluate()
. Throws
NullPointerException
if this is null
interval
- interval in miliseconds to reset this aggregatorpublic ArrayListBackedAggregator(Function<List<T>,T> aggregationFunction, long interval, boolean useSharedTimer)
aggregationFunction
- Aggregation function to use in AbstractTimedAggregator.evaluate()
. Throws
NullPointerException
if this is null
interval
- 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–2014 The Apache Software Foundation. All rights reserved.