| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
bufferSize |
protected Sequence |
cursor |
protected Sequence[] |
gatingSequences |
protected WaitStrategy |
waitStrategy |
INITIAL_CURSOR_VALUE| 构造器和说明 |
|---|
AbstractSequencer(int bufferSize,
WaitStrategy waitStrategy)
Create with the specified buffer size and wait strategy.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclaim, getHighestPublishedSequence, isAvailablehasAvailableCapacity, next, next, publish, publish, remainingCapacity, tryNext, tryNextprotected final int bufferSize
protected final WaitStrategy waitStrategy
protected final Sequence cursor
protected volatile Sequence[] gatingSequences
public AbstractSequencer(int bufferSize,
WaitStrategy waitStrategy)
bufferSize - The total number of entries, must be a positive power of 2.waitStrategy - waitStrategypublic final long getCursor()
CursoredgetCursor 在接口中 CursoredCursored.getCursor()public final int getBufferSize()
SequencedgetBufferSize 在接口中 SequencedSequenced.getBufferSize()public final void addGatingSequences(Sequence... gatingSequences)
SequenceraddGatingSequences 在接口中 SequencergatingSequences - The sequences to add.Sequencer.addGatingSequences(Sequence...)public boolean removeGatingSequence(Sequence sequence)
SequencerremoveGatingSequence 在接口中 Sequencersequence - to be removed.Sequencer.removeGatingSequence(Sequence)public long getMinimumSequence()
SequencergetMinimumSequence 在接口中 SequencerSequencer.getMinimumSequence()public SequenceBarrier newBarrier(Sequence... sequencesToTrack)
SequencernewBarrier 在接口中 SequencersequencesToTrack - sequencesToTrackSequencer.newBarrier(Sequence...)public <T> EventPoller<T> newPoller(DataProvider<T> dataProvider, Sequence... gatingSequences)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.