T - event implementation storing the data for sharing during exchange or parallel coordination of an event.public final class AggregateEventHandler<T> extends java.lang.Object implements EventHandler<T>, LifecycleAware
EventHandlers that get called in sequence for each event.| Constructor and Description |
|---|
AggregateEventHandler(EventHandler<T>... eventHandlers)
Construct an aggregate collection of
EventHandlers to be called in sequence. |
| Modifier and Type | Method and Description |
|---|---|
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.
Sequence event processing will already have stopped before this method is called.
|
void |
onStart()
Called once on thread start before first event is available.
|
public AggregateEventHandler(EventHandler<T>... eventHandlers)
EventHandlers to be called in sequence.eventHandlers - to be called in sequence.public void onEvent(T event, long sequence, boolean endOfBatch) throws java.lang.Exception
EventHandlerRingBufferonEvent 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 RingBufferjava.lang.Exception - if the EventHandler would like the exception handled further up the chain.public void onStart()
LifecycleAwareonStart in interface LifecycleAwarepublic void onShutdown()
LifecycleAwareonShutdown in interface LifecycleAwareCopyright © 2011 - 2013 LMAX Ltd. All Rights Reserved.