Class AsyncLoggerConfigDisruptor.Log4jEventWrapperHandler

java.lang.Object
org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor.Log4jEventWrapperHandler
All Implemented Interfaces:
com.lmax.disruptor.EventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>, com.lmax.disruptor.SequenceReportingEventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
Enclosing class:
AsyncLoggerConfigDisruptor

private static class AsyncLoggerConfigDisruptor.Log4jEventWrapperHandler extends Object implements com.lmax.disruptor.SequenceReportingEventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
EventHandler performs the work in a separate thread.
  • Field Details

    • NOTIFY_PROGRESS_THRESHOLD

      private static final int NOTIFY_PROGRESS_THRESHOLD
      See Also:
    • sequenceCallback

      private com.lmax.disruptor.Sequence sequenceCallback
    • counter

      private int counter
  • Constructor Details

    • Log4jEventWrapperHandler

      private Log4jEventWrapperHandler()
  • Method Details

    • setSequenceCallback

      public void setSequenceCallback(com.lmax.disruptor.Sequence sequenceCallback)
      Specified by:
      setSequenceCallback in interface com.lmax.disruptor.SequenceReportingEventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
    • onEvent

      public void onEvent(AsyncLoggerConfigDisruptor.Log4jEventWrapper event, long sequence, boolean endOfBatch) throws Exception
      Specified by:
      onEvent in interface com.lmax.disruptor.EventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
      Throws:
      Exception
    • notifyIntermediateProgress

      private void notifyIntermediateProgress(long sequence)
      Notify the BatchEventProcessor that the sequence has progressed. Without this callback the sequence would not be progressed until the batch has completely finished.