public interface Sequencer extends Cursored, Sequenced
Sequences| Modifier and Type | Field and Description |
|---|---|
static long |
INITIAL_CURSOR_VALUE
Set to -1 as sequence starting point
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGatingSequences(Sequence... gatingSequences)
Add the specified gating sequences to this instance of the Disruptor.
|
void |
claim(long sequence)
Claim a specific sequence.
|
long |
getHighestPublishedSequence(long nextSequence,
long availableSequence)
Get the highest sequence number that can be safely read from the ring buffer.
|
long |
getMinimumSequence()
Get the minimum sequence value from all of the gating sequences
added to this ringBuffer.
|
boolean |
isAvailable(long sequence)
Confirms if a sequence is published and the event is available for use; non-blocking.
|
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> provider,
Sequence... gatingSequences) |
boolean |
removeGatingSequence(Sequence sequence)
Remove the specified sequence from this sequencer.
|
getBufferSize, hasAvailableCapacity, next, next, publish, publish, remainingCapacity, tryNext, tryNextstatic final long INITIAL_CURSOR_VALUE
void claim(long sequence)
sequence - The sequence to initialise too.boolean isAvailable(long sequence)
sequence - of the buffer to checkvoid addGatingSequences(Sequence... gatingSequences)
gatingSequences - The sequences to add.boolean removeGatingSequence(Sequence sequence)
sequence - to be removed.SequenceBarrier newBarrier(Sequence... sequencesToTrack)
sequencesToTrack - All of the sequences that the newly constructed barrier will wait on.SequenceBarrierlong getMinimumSequence()
long getHighestPublishedSequence(long nextSequence,
long availableSequence)
>= nextSequence the return value will be
nextSequence - 1. To work correctly a consumer should pass a value that
is 1 higher than the last sequence that was successfully processed.nextSequence - The sequence to start scanning from.availableSequence - The sequence to scan to.nextSequence - 1.<T> EventPoller<T> newPoller(DataProvider<T> provider, Sequence... gatingSequences)
Copyright © 2011 - 2018 LMAX Ltd. All Rights Reserved.