|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lmax.disruptor.AbstractMultithreadedClaimStrategy
public abstract class AbstractMultithreadedClaimStrategy
| Constructor Summary | |
|---|---|
AbstractMultithreadedClaimStrategy(int bufferSize)
|
|
| Method Summary | |
|---|---|
long |
checkAndIncrement(int availableCapacity,
int delta,
Sequence[] gatingSequences)
Atomically checks the available capacity of the ring buffer and claims the next sequence. |
int |
getBufferSize()
Get the size of the data structure used to buffer events. |
long |
getSequence()
Get the current claimed sequence. |
boolean |
hasAvailableCapacity(int availableCapacity,
Sequence[] dependentSequences)
Is there available capacity in the buffer for the requested sequence. |
long |
incrementAndGet(int delta,
Sequence[] dependentSequences)
Increment sequence by a delta and get the result. |
long |
incrementAndGet(Sequence[] dependentSequences)
Claim the next sequence in the Sequencer. |
void |
setSequence(long sequence,
Sequence[] dependentSequences)
Set the current sequence value for claiming an event in the Sequencer
The caller should be held up until the claimed sequence is available by tracking the dependentSequences. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.lmax.disruptor.ClaimStrategy |
|---|
serialisePublishing |
| Constructor Detail |
|---|
public AbstractMultithreadedClaimStrategy(int bufferSize)
| Method Detail |
|---|
public int getBufferSize()
ClaimStrategy
getBufferSize in interface ClaimStrategypublic long getSequence()
ClaimStrategy
getSequence in interface ClaimStrategy
public boolean hasAvailableCapacity(int availableCapacity,
Sequence[] dependentSequences)
ClaimStrategy
hasAvailableCapacity in interface ClaimStrategyavailableCapacity - remaining in the buffer.dependentSequences - to be checked for range.
public long incrementAndGet(Sequence[] dependentSequences)
ClaimStrategySequencer.
The caller should be held up until the claimed sequence is available by tracking the dependentSequences.
incrementAndGet in interface ClaimStrategydependentSequences - to be checked for range.
public long checkAndIncrement(int availableCapacity,
int delta,
Sequence[] gatingSequences)
throws InsufficientCapacityException
ClaimStrategy
checkAndIncrement in interface ClaimStrategyavailableCapacity - the capacity that should be available before claiming the next slotdelta - the number of slots to claimgatingSequences - the set of sequences to check to ensure capacity is available
InsufficientCapacityException - thrown if capacity is not available
public long incrementAndGet(int delta,
Sequence[] dependentSequences)
ClaimStrategy
incrementAndGet in interface ClaimStrategydelta - to increment by.dependentSequences - to be checked for range.
public void setSequence(long sequence,
Sequence[] dependentSequences)
ClaimStrategySequencer
The caller should be held up until the claimed sequence is available by tracking the dependentSequences.
setSequence in interface ClaimStrategysequence - to be set as the current value.dependentSequences - to be checked for range.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||