public abstract class AbstractSequencer extends java.lang.Object implements Sequencer
INITIAL_CURSOR_VALUE| Constructor and Description |
|---|
AbstractSequencer(int bufferSize,
WaitStrategy waitStrategy)
Create with the specified buffer size and wait strategy.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGatingSequences(Sequence... gatingSequences)
Add the specified gating sequences to this instance of the Disruptor.
|
int |
getBufferSize()
The capacity of the data structure to hold entries.
|
long |
getCursor()
Get the current cursor value.
|
long |
getMinimumSequence()
Get the minimum sequence value from all of the gating sequences
added to this ringBuffer.
|
SequenceBarrier |
newBarrier(Sequence... sequencesToTrack)
Create a new SequenceBarrier to be used by an EventProcessor to track which messages
are available to be read from the ring buffer given a list of sequences to track.
|
<T> EventPoller<T> |
newPoller(DataProvider<T> dataProvider,
Sequence... gatingSequences)
Creates an event poller for this sequence that will use the supplied data provider and
gating sequences.
|
boolean |
removeGatingSequence(Sequence sequence)
Remove the specified sequence from this sequencer.
|
java.lang.String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitclaim, getHighestPublishedSequence, isAvailablehasAvailableCapacity, next, next, publish, publish, remainingCapacity, tryNext, tryNextpublic AbstractSequencer(int bufferSize,
WaitStrategy waitStrategy)
bufferSize - The total number of entries, must be a positive power of 2.waitStrategy - The wait strategy used by this sequencerpublic final long getCursor()
CursoredgetCursor in interface CursoredCursored.getCursor()public final int getBufferSize()
SequencedgetBufferSize in interface SequencedSequenced.getBufferSize()public final void addGatingSequences(Sequence... gatingSequences)
SequenceraddGatingSequences in interface SequencergatingSequences - The sequences to add.Sequencer.addGatingSequences(Sequence...)public boolean removeGatingSequence(Sequence sequence)
SequencerremoveGatingSequence in interface Sequencersequence - to be removed.Sequencer.removeGatingSequence(Sequence)public long getMinimumSequence()
SequencergetMinimumSequence in interface SequencerSequencer.getMinimumSequence()public SequenceBarrier newBarrier(Sequence... sequencesToTrack)
SequencernewBarrier in interface SequencersequencesToTrack - All of the sequences that the newly constructed barrier will wait on.Sequencer.newBarrier(Sequence...)public <T> EventPoller<T> newPoller(DataProvider<T> dataProvider, Sequence... gatingSequences)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2011 - 2018 LMAX Ltd. All Rights Reserved.