public interface ModificationCounter
Implementations must reliably detect up to 4 billion modifications (2^32-1).
Implementations are not required to be thread-safe.
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentValue()
Returns the current value of the counter.
|
boolean |
isModifiedSince(int lastValue)
Returns true if the counter was modified since the given value (if
notifyModified()
has been invoked); false — otherwise. |
void |
notifyModified()
Notifies this counter that the source object is modified, updating its current value.
|
boolean isModifiedSince(int lastValue)
notifyModified()
has been invoked); false — otherwise.lastValue - the last value of the counterint getCurrentValue()
void notifyModified()
IllegalStateException - if this counter corresponds to a read-only (immutable) object,
i.e., must reject any modification eventsCopyright © 2019 Exonum. All rights reserved.