-
- All Superinterfaces:
java.lang.Runnable
- All Known Implementing Classes:
BatchEventProcessor,NoOpEventProcessor
public interface EventProcessor extends java.lang.RunnableAn EventProcessor needs to be an implementation of a runnable that will poll for events from theRingBufferusing the appropriate wait strategy. It is unlikely that you will need to implement this interface yourself. Look at using theEventHandlerinterface along with the pre-supplied BatchEventProcessor in the first instance.An EventProcessor will generally be associated with a Thread for execution.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SequencegetSequence()Get a reference to theSequencebeing used by thisEventProcessor.voidhalt()Signal that this EventProcessor should stop when it has finished consuming at the next clean break.booleanisRunning()
-
-
-
Method Detail
-
getSequence
Sequence getSequence()
Get a reference to theSequencebeing used by thisEventProcessor.- Returns:
- reference to the
Sequencefor 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()
- Returns:
- whether this event processor is running or not Implementations should ideally return false only when the associated thread is idle.
-
-