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 Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final int
private com.lmax.disruptor.Sequence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
notifyIntermediateProgress
(long sequence) Notify the BatchEventProcessor that the sequence has progressed.void
onEvent
(AsyncLoggerConfigDisruptor.Log4jEventWrapper event, long sequence, boolean endOfBatch) void
setSequenceCallback
(com.lmax.disruptor.Sequence sequenceCallback)
-
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 interfacecom.lmax.disruptor.SequenceReportingEventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
-
onEvent
public void onEvent(AsyncLoggerConfigDisruptor.Log4jEventWrapper event, long sequence, boolean endOfBatch) throws Exception - Specified by:
onEvent
in interfacecom.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.
-