com.lmax.disruptor
Class NoOpEventProcessor

java.lang.Object
  extended by com.lmax.disruptor.NoOpEventProcessor
All Implemented Interfaces:
EventProcessor, java.lang.Runnable

public final class NoOpEventProcessor
extends java.lang.Object
implements EventProcessor

No operation version of a EventProcessor that simply tracks a Sequencer. This is useful in tests or for pre-filling a RingBuffer from a publisher.


Constructor Summary
NoOpEventProcessor(Sequencer sequencer)
          Construct a EventProcessor that simply tracks a Sequencer.
 
Method Summary
 Sequence getSequence()
          Get a reference to the Sequence being used by this EventProcessor.
 void halt()
          Signal that this EventProcessor should stop when it has finished consuming at the next clean break.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoOpEventProcessor

public NoOpEventProcessor(Sequencer sequencer)
Construct a EventProcessor that simply tracks a Sequencer.

Parameters:
sequencer - to track.
Method Detail

getSequence

public Sequence getSequence()
Description copied from interface: EventProcessor
Get a reference to the Sequence being used by this EventProcessor.

Specified by:
getSequence in interface EventProcessor
Returns:
reference to the Sequence for this EventProcessor

halt

public void halt()
Description copied from interface: EventProcessor
Signal that this EventProcessor should stop when it has finished consuming at the next clean break. It will call SequenceBarrier.alert() to notify the thread to check status.

Specified by:
halt in interface EventProcessor

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2011 LMAX Ltd. All Rights Reserved.