|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lmax.disruptor.AggregateEventHandler<T>
T - event implementation storing the data for sharing during exchange or parallel coordination of an event.public final class AggregateEventHandler<T>
An aggregate collection of EventHandlers that get called in sequence for each event.
| Constructor Summary | |
|---|---|
AggregateEventHandler(EventHandler<T>... eventHandlers)
Construct an aggregate collection of EventHandlers to be called in sequence. |
|
| Method Summary | |
|---|---|
void |
onEvent(T event,
long sequence,
boolean endOfBatch)
Called when a publisher has published an event to the RingBuffer |
void |
onShutdown()
Called once just before the thread is shutdown. |
void |
onStart()
Called once on thread start before first event is available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AggregateEventHandler(EventHandler<T>... eventHandlers)
EventHandlers to be called in sequence.
eventHandlers - to be called in sequence.| Method Detail |
|---|
public void onEvent(T event,
long sequence,
boolean endOfBatch)
throws java.lang.Exception
EventHandlerRingBuffer
onEvent in interface EventHandler<T>event - published to the RingBuffersequence - of the event being processedendOfBatch - flag to indicate if this is the last event in a batch from the RingBuffer
java.lang.Exception - if the EventHandler would like the exception handled further up the chain.public void onStart()
LifecycleAware
onStart in interface LifecycleAwarepublic void onShutdown()
LifecycleAware
onShutdown in interface LifecycleAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||