Class RingBufferLogEventHandler

  • All Implemented Interfaces:
    com.lmax.disruptor.EventHandler<RingBufferLogEvent>, com.lmax.disruptor.LifecycleAware, com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>

    public class RingBufferLogEventHandler
    extends Object
    implements com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>, com.lmax.disruptor.LifecycleAware
    This event handler gets passed messages from the RingBuffer as they become available. Processing of these messages is done in a separate thread, controlled by the Executor passed to the Disruptor constructor.
    • Constructor Detail

      • RingBufferLogEventHandler

        public RingBufferLogEventHandler()
    • Method Detail

      • setSequenceCallback

        public void setSequenceCallback​(com.lmax.disruptor.Sequence sequenceCallback)
        Specified by:
        setSequenceCallback in interface com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>
      • getThreadId

        public long getThreadId()
        Returns the thread ID of the background consumer thread, or -1 if the background thread has not started yet.
        Returns:
        the thread ID of the background consumer thread, or -1
      • onStart

        public void onStart()
        Specified by:
        onStart in interface com.lmax.disruptor.LifecycleAware
      • onShutdown

        public void onShutdown()
        Specified by:
        onShutdown in interface com.lmax.disruptor.LifecycleAware