public interface NextExpectedMessageSequenceNumberStore
Provides and checks the incoming message sequence numbers
| Modifier and Type | Method and Description |
|---|---|
void |
compareAndIncrement(long expected)
Checks that the next expected value is what is expected and then increments the next expected by 1.
|
void |
compareAndSet(long expected,
long newValue)
Checks that the next expected value is what is expected.
|
long |
getNextExpected()
Get the current next expected message sequence number.
|
void |
set(long newValue) |
void set(long newValue)
void compareAndSet(long expected,
long newValue)
throws java.lang.IllegalStateException
expected - expected current valuenewValue - new value to setjava.lang.IllegalStateException - if the current value does not match expectedvoid compareAndIncrement(long expected)
throws java.lang.IllegalStateException
expected - expected current value; will error if it's not the samejava.lang.IllegalStateException - if the current value does not match expectedlong getNextExpected()