org.apache.logging.log4j.core.async
Class RingBufferLogEventHandler

java.lang.Object
  extended by org.apache.logging.log4j.core.async.RingBufferLogEventHandler
All Implemented Interfaces:
com.lmax.disruptor.EventHandler<RingBufferLogEvent>, com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>

public class RingBufferLogEventHandler
extends Object
implements com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>

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.


Constructor Summary
RingBufferLogEventHandler()
           
 
Method Summary
 void onEvent(RingBufferLogEvent event, long sequence, boolean endOfBatch)
           
 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
 

Constructor Detail

RingBufferLogEventHandler

public RingBufferLogEventHandler()
Method Detail

setSequenceCallback

public void setSequenceCallback(com.lmax.disruptor.Sequence sequenceCallback)
Specified by:
setSequenceCallback in interface com.lmax.disruptor.SequenceReportingEventHandler<RingBufferLogEvent>

onEvent

public void onEvent(RingBufferLogEvent event,
                    long sequence,
                    boolean endOfBatch)
             throws Exception
Specified by:
onEvent in interface com.lmax.disruptor.EventHandler<RingBufferLogEvent>
Throws:
Exception


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.