public final class NoOpEventProcessor extends java.lang.Object implements EventProcessor
EventProcessor that simply tracks a Sequence.
This is useful in tests or for pre-filling a RingBuffer from a publisher.
| Modifier and Type | Class and Description |
|---|---|
private static class |
NoOpEventProcessor.SequencerFollowingSequence
Sequence that follows (by wrapping) another sequence
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicBoolean |
running |
private NoOpEventProcessor.SequencerFollowingSequence |
sequence |
| Constructor and Description |
|---|
NoOpEventProcessor(RingBuffer<?> sequencer)
Construct a
EventProcessor that simply tracks a Sequence object. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
isRunning() |
void |
run() |
private final NoOpEventProcessor.SequencerFollowingSequence sequence
private final java.util.concurrent.atomic.AtomicBoolean running
public NoOpEventProcessor(RingBuffer<?> sequencer)
EventProcessor that simply tracks a Sequence object.sequencer - to track.public Sequence getSequence()
EventProcessorSequence being used by this EventProcessor.getSequence in interface EventProcessorSequence for this EventProcessorpublic void halt()
EventProcessorSequenceBarrier.alert() to notify the thread to check status.halt in interface EventProcessorpublic boolean isRunning()
isRunning in interface EventProcessorpublic void run()
run in interface java.lang.Runnable