|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClaimStrategy
Strategies employed for claiming the sequence of AbstractEntry
s in the RingBuffer
by producers.
The AbstractEntry
index is a the sequence value mod the RingBuffer
capacity.
Nested Class Summary | |
---|---|
static class |
ClaimStrategy.MultiThreadedStrategy
Strategy to be used when there are multiple producer threads claiming AbstractEntry s. |
static class |
ClaimStrategy.Option
Indicates the threading policy to be applied for claiming AbstractEntry s by producers to the RingBuffer |
static class |
ClaimStrategy.SingleThreadedStrategy
Optimised strategy can be used when there is a single producer thread claiming AbstractEntry s. |
Method Summary | |
---|---|
long |
incrementAndGet()
Claim the next sequence index in the RingBuffer and increment. |
long |
incrementAndGet(int delta)
Increment by a delta and get the result. |
void |
setSequence(long sequence)
Set the current sequence value for claiming AbstractEntry in the RingBuffer |
Method Detail |
---|
long incrementAndGet()
RingBuffer
and increment.
AbstractEntry
index to be used for the producer.long incrementAndGet(int delta)
delta
- to increment by.
void setSequence(long sequence)
AbstractEntry
in the RingBuffer
sequence
- to be set as the current value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |