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 int
counter
private static int
NOTIFY_PROGRESS_THRESHOLD
private com.lmax.disruptor.Sequence
sequenceCallback
-
Constructor Summary
Constructors Modifier Constructor Description private
Log4jEventWrapperHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private 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 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:
setSequenceCallback
in interfacecom.lmax.disruptor.SequenceReportingEventHandler<AsyncLoggerConfigDisruptor.Log4jEventWrapper>
-
onEvent
public void onEvent(AsyncLoggerConfigDisruptor.Log4jEventWrapper event, long sequence, boolean endOfBatch) throws java.lang.Exception
- Specified by:
onEvent
in 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.
-
-