-
- All Superinterfaces:
java.lang.Runnable
- All Known Implementing Classes:
BatchEventProcessor
,NoOpEventProcessor
public interface EventProcessor extends java.lang.Runnable
An EventProcessor needs to be an implementation of a runnable that will poll for events from theRingBuffer
using the appropriate wait strategy. It is unlikely that you will need to implement this interface yourself. Look at using theEventHandler
interface 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 Sequence
getSequence()
Get 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
isRunning()
-
-
-
Method Detail
-
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()
- Returns:
- whether this event processor is running or not Implementations should ideally return false only when the associated thread is idle.
-
-