public abstract class AbstractAccumulator<T> extends Object implements Accumulator<T>
| Modifier and Type | Method and Description |
|---|---|
void |
add(T item)
Adds an item to the current batch.
|
boolean |
isReady()
Indicates whether the accumulator is ready to process items.
|
int |
maxBatchMillis()
Returns the maximum number of millis allowed to expire since the first
item before processing is triggered.
|
int |
maxIdleMillis()
Returns the maximum number of millis allowed to expire since the last
item arrival before processing is triggered.
|
int |
maxItems()
Returns the maximum number of items allowed to accumulate before
processing is triggered.
|
Timer |
timer()
Returns the backing timer.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessItemspublic void add(T item)
Accumulatoradd in interface Accumulator<T>item - item to be added to the current batchpublic boolean isReady()
AccumulatorisReady in interface Accumulator<T>public Timer timer()
public int maxItems()
public int maxBatchMillis()
public int maxIdleMillis()
Copyright © 2013–2018. All rights reserved.