Interface EventProcessor

All Superinterfaces:
Runnable
All Known Implementing Classes:
BatchEventProcessor, NoOpEventProcessor, WorkProcessor

public interface EventProcessor extends 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 Summary

    Modifier and Type
    Method
    Description
    Get a reference to the Sequence being used by this EventProcessor.
    void
    Signal that this EventProcessor should stop when it has finished consuming at the next clean break.
    boolean
     

    Methods inherited from interface java.lang.Runnable

    run
  • Method Details

    • getSequence

      Sequence getSequence()
      Get a reference to the Sequence being used by this EventProcessor.
      Returns:
      reference to the Sequence for this EventProcessor
    • 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()