Interface EventProcessor

  • 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 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 Detail

      • halt

        void halt()
        Signal that this EventProcessor should stop when it has finished consuming at the next clean break. It will call SequenceBarrier.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.