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 java.lang.Object implements com.lmax.disruptor.SequenceReportingEventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
EventHandler performs the work in a separate thread.
-
-
Field Summary
Fields Modifier and Type Field Description private intcounterprivate static intNOTIFY_PROGRESS_THRESHOLDprivate com.lmax.disruptor.SequencesequenceCallback
-
Constructor Summary
Constructors Modifier Constructor Description privateLog4jEventWrapperHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidnotifyIntermediateProgress(long sequence)Notify the BatchEventProcessor that the sequence has progressed.voidonEvent(AsyncLoggerConfigDisruptor.Log4jEventWrapper event, long sequence, boolean endOfBatch)voidsetSequenceCallback(com.lmax.disruptor.Sequence sequenceCallback)
-
-
-
Field Detail
-
NOTIFY_PROGRESS_THRESHOLD
private static final int NOTIFY_PROGRESS_THRESHOLD
- See Also:
- Constant Field Values
-
sequenceCallback
private com.lmax.disruptor.Sequence sequenceCallback
-
counter
private int counter
-
-
Method Detail
-
setSequenceCallback
public void setSequenceCallback(com.lmax.disruptor.Sequence sequenceCallback)
- Specified by:
setSequenceCallbackin interfacecom.lmax.disruptor.SequenceReportingEventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
-
onEvent
public void onEvent(AsyncLoggerConfigDisruptor.Log4jEventWrapper event, long sequence, boolean endOfBatch) throws java.lang.Exception
- Specified by:
onEventin interfacecom.lmax.disruptor.EventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>- Throws:
java.lang.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.
-
-