public class SequenceNumber extends Object
Modifier and Type | Field and Description |
---|---|
static long |
MAX_VALUE
Represents the highest possible value for a sequence number: uint32 max:
4.294.967.295.
|
Constructor and Description |
---|
SequenceNumber()
Constructor starting with 0 as the sequence number.
|
SequenceNumber(long value)
Constructor starting with the specified number for the internal counter.
|
Modifier and Type | Method and Description |
---|---|
long |
get()
Returns the internal counter value.
|
long |
incrementAndGet()
Increment the internal counter and returns the new result in an atomic
fashion.
|
public static final long MAX_VALUE
public SequenceNumber()
public SequenceNumber(long value)
value
- start number within uint32 rangeIllegalArgumentException
- value outside uint32 rangeCopyright © 2018 CoR-Lab. All rights reserved.