Class RingBufferLogEventHandler
java.lang.Object
org.apache.logging.log4j.core.async.RingBufferLogEventHandler
- All Implemented Interfaces:
com.lmax.disruptor.EventHandler<RingBufferLogEvent>
,com.lmax.disruptor.LifecycleAware
,com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>
@Deprecated
public class RingBufferLogEventHandler
extends Object
implements com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>, com.lmax.disruptor.LifecycleAware
Deprecated.
Only used internally, will be removed in the next major version.
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.
Warning: this class only works with Disruptor 3.x.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the thread ID of the background consumer thread, or-1
if the background thread has not started yet.void
onEvent
(RingBufferLogEvent event, long sequence, boolean endOfBatch) void
void
onStart()
void
setSequenceCallback
(com.lmax.disruptor.Sequence sequenceCallback) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.lmax.disruptor.EventHandler
onEvent
Methods inherited from interface com.lmax.disruptor.LifecycleAware
onShutdown, onStart
Methods inherited from interface com.lmax.disruptor.SequenceReportingEventHandler
setSequenceCallback
-
Constructor Details
-
RingBufferLogEventHandler
public RingBufferLogEventHandler()Deprecated.
-
-
Method Details
-
setSequenceCallback
public void setSequenceCallback(com.lmax.disruptor.Sequence sequenceCallback) -
onEvent
- Specified by:
onEvent
in interfacecom.lmax.disruptor.EventHandler<RingBufferLogEvent>
- Throws:
Exception
-
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() -
onShutdown
public void onShutdown()
-