Package com.lmax.disruptor
Interface EventProcessor
- All Superinterfaces:
Runnable
- All Known Implementing Classes:
BatchEventProcessor
,NoOpEventProcessor
,WorkProcessor
An EventProcessor needs to be an implementation of a runnable that will poll for events from the
RingBuffer
using the appropriate wait strategy. It is unlikely that you will need to implement this interface yourself.
Look at using the EventHandler
interface along with the pre-supplied BatchEventProcessor in the first
instance.
An EventProcessor will generally be associated with a Thread for execution.
-
Method Summary
Modifier and TypeMethodDescriptionGet a reference to theSequence
being used by thisEventProcessor
.void
halt()
Signal that this EventProcessor should stop when it has finished consuming at the next clean break.boolean
-
Method Details
-
getSequence
Sequence getSequence()Get a reference to theSequence
being used by thisEventProcessor
.- Returns:
- reference to the
Sequence
for thisEventProcessor
-
halt
void halt()Signal that this EventProcessor should stop when it has finished consuming at the next clean break. It will callSequenceBarrier.alert()
to notify the thread to check status. -
isRunning
boolean isRunning()
-