public class RingBufferLogEventHandler extends java.lang.Object implements com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>, com.lmax.disruptor.LifecycleAware
Executor
passed to the Disruptor
constructor.Modifier and Type | Field and Description |
---|---|
private int |
counter |
private static int |
NOTIFY_PROGRESS_THRESHOLD |
private com.lmax.disruptor.Sequence |
sequenceCallback |
private long |
threadId |
Constructor and Description |
---|
RingBufferLogEventHandler() |
Modifier and Type | Method and Description |
---|---|
long |
getThreadId()
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 |
onShutdown() |
void |
onStart() |
void |
setSequenceCallback(com.lmax.disruptor.Sequence sequenceCallback) |
private static final int NOTIFY_PROGRESS_THRESHOLD
private com.lmax.disruptor.Sequence sequenceCallback
private int counter
private long threadId
public void setSequenceCallback(com.lmax.disruptor.Sequence sequenceCallback)
setSequenceCallback
in interface com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>
public void onEvent(RingBufferLogEvent event, long sequence, boolean endOfBatch) throws java.lang.Exception
onEvent
in interface com.lmax.disruptor.EventHandler<RingBufferLogEvent>
java.lang.Exception
public long getThreadId()
-1
if the background thread has not started
yet.-1
public void onStart()
onStart
in interface com.lmax.disruptor.LifecycleAware
public void onShutdown()
onShutdown
in interface com.lmax.disruptor.LifecycleAware