Package com.lmax.disruptor
Interface SequenceReportingEventHandler<T>
- Type Parameters:
T- event implementation storing the data for sharing during exchange or parallel coordination of an event.
- All Superinterfaces:
EventHandler<T>,EventHandlerBase<T>,EventHandlerIdentity
Used by the
BatchEventProcessor to set a callback allowing the EventHandler to notify
when it has finished consuming an event if this happens after the EventHandler.onEvent(Object, long, boolean) call.
Typically this would be used when the handler is performing some sort of batching operation such as writing to an IO
device; after the operation has completed, the implementation should call Sequence.set(long) to update the
sequence and allow other processes that are dependent on this handler to progress.
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetSequenceCallback(Sequence sequenceCallback) Call by theBatchEventProcessorto setup the callback.Methods inherited from interface com.lmax.disruptor.EventHandler
onEventMethods inherited from interface com.lmax.disruptor.EventHandlerBase
onBatchStart, onShutdown, onStart, onTimeout
-
Method Details
-
setSequenceCallback
Call by theBatchEventProcessorto setup the callback.- Specified by:
setSequenceCallbackin interfaceEventHandler<T>- Parameters:
sequenceCallback- callback on which to notify theBatchEventProcessorthat the sequence has progressed.
-