public final class SequenceGroup extends Sequence
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).
| 限定符和类型 | 字段和说明 |
|---|---|
protected long |
p1 |
protected long |
p10 |
protected long |
p11 |
protected long |
p12 |
protected long |
p13 |
protected long |
p14 |
protected long |
p15 |
protected long |
p2 |
protected long |
p3 |
protected long |
p4 |
protected long |
p5 |
protected long |
p6 |
protected long |
p7 |
protected long |
p9 |
protected long |
value |
| 构造器和说明 |
|---|
SequenceGroup()
Default Constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(Sequence sequence)
Add a
Sequence into this aggregate. |
void |
addWhileRunning(Cursored cursored,
Sequence sequence)
Adds a sequence to the sequence group after threads have started to publish to
the Disruptor.
|
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.
|
addAndGet, compareAndSet, incrementAndGet, setVolatile, toStringprotected long p9
protected long p10
protected long p11
protected long p12
protected long p13
protected long p14
protected long p15
protected volatile long value
protected long p1
protected long p2
protected long p3
protected long p4
protected long p5
protected long p6
protected long p7
public long get()
public void set(long value)
Sequences in the group to a given value.public void add(Sequence sequence)
Sequence into this aggregate. This should only be used during
initialisation. Use addWhileRunning(Cursored, Sequence)sequence - to be added to the aggregate.addWhileRunning(Cursored, Sequence)public boolean remove(Sequence sequence)
Sequence from this aggregate.sequence - to be removed from this aggregate.public int size()
public void addWhileRunning(Cursored cursored, Sequence sequence)
cursored - The data structure that the owner of this sequence group will
be pulling it's events from.sequence - The sequence to add.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.