|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lmax.disruptor.Sequence
com.lmax.disruptor.SequenceGroup
public final class SequenceGroup
Sequence group that can dynamically have Sequences added and removed while being
thread safe.
The get() and set(long) methods are lock free and can be
concurrently be called with the add(Sequence) and remove(Sequence).
| Constructor Summary | |
|---|---|
SequenceGroup()
Default Constructor |
|
| Method Summary | |
|---|---|
void |
add(Sequence sequence)
Add a Sequence into this aggregate. |
long |
get()
Get the minimum sequence value for the group. |
boolean |
remove(Sequence sequence)
Remove the first occurrence of the Sequence from this aggregate. |
void |
set(long value)
Set all Sequences in the group to a given value. |
int |
size()
Get the size of the group. |
| Methods inherited from class com.lmax.disruptor.Sequence |
|---|
addAndGet, compareAndSet, incrementAndGet, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SequenceGroup()
| Method Detail |
|---|
public long get()
get in class Sequencepublic void set(long value)
Sequences in the group to a given value.
set in class Sequencevalue - to set the group of sequences to.public void add(Sequence sequence)
Sequence into this aggregate.
sequence - to be added to the aggregate.public boolean remove(Sequence sequence)
Sequence from this aggregate.
sequence - to be removed from this aggregate.
public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||