T - event implementation storing the data for sharing during exchange or parallel coordination of an event.public final class AggregateEventHandler<T> extends Object implements EventHandler<T>, LifecycleAware
EventHandlers that get called in sequence for each event.| 构造器和说明 |
|---|
AggregateEventHandler(EventHandler<T>... eventHandlers)
Construct an aggregate collection of
EventHandlers to be called in sequence. |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
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 Exception
EventHandlerRingBufferonEvent 在接口中 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 RingBufferException - if the EventHandler would like the exception handled further up the chain.public void onStart()
LifecycleAwareonStart 在接口中 LifecycleAwarepublic void onShutdown()
LifecycleAwareCalled once just before the thread is shutdown.
Sequence event processing will already have stopped before this method is called. No events will be processed after this message.
onShutdown 在接口中 LifecycleAwareCopyright © 2018 Pivotal Software, Inc.. All rights reserved.