public abstract class AbstractEventAccumulator extends Object implements EventAccumulator
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEventAccumulator(Timer timer,
int maxEvents,
int maxBatchMillis,
int maxIdleMillis)
Creates an event accumulator capable of triggering on the specified
thresholds.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Event event)
Adds an event to the current batch.
|
int |
maxBatchMillis()
Returns the maximum number of millis allowed to expire since the first
event before processing is triggered.
|
int |
maxEvents()
Returns the maximum number of events allowed to accumulate before
processing is triggered.
|
int |
maxIdleMillis()
Returns the maximum number of millis allowed to expire since the last
event arrival before processing is triggered.
|
Timer |
timer()
Returns the backing timer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessEventsprotected AbstractEventAccumulator(Timer timer, int maxEvents, int maxBatchMillis, int maxIdleMillis)
timer - timer to use for scheduling check-pointsmaxEvents - maximum number of events to accumulate before
processing is triggeredmaxBatchMillis - maximum number of millis allowed since the first
event before processing is triggeredmaxIdleMillis - maximum number millis between events before
processing is triggeredpublic void add(Event event)
EventAccumulatoradd in interface EventAccumulatorevent - event to be added to the current batchpublic Timer timer()
public int maxEvents()
public int maxBatchMillis()
public int maxIdleMillis()
Copyright © 2015. All rights reserved.