Package org.jgroups.protocols
Class COUNTER.VersionedValue
java.lang.Object
org.jgroups.protocols.COUNTER.VersionedValue
- Enclosing class:
COUNTER
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVersionedValue(long value) protectedVersionedValue(long value, long version) -
Method Summary
Modifier and TypeMethodDescriptionprotected long[]addAndGet(long num) protected long[]compareAndSwap(long expected, long update) protected long[]set(long value) (package private) long[]snapshot()toString()(package private) <T extends Streamable>
COUNTER.UpdateResult<T> update(CounterFunction<T> updateFunction) protected voidupdateIfBigger(long value, long version) Sets the value only if the version argument is greater than the own version
-
Field Details
-
value
protected long value -
version
protected long version
-
-
Constructor Details
-
VersionedValue
protected VersionedValue(long value) -
VersionedValue
protected VersionedValue(long value, long version)
-
-
Method Details
-
addAndGet
protected long[] addAndGet(long num) -
set
protected long[] set(long value) -
compareAndSwap
protected long[] compareAndSwap(long expected, long update) -
updateIfBigger
protected void updateIfBigger(long value, long version) Sets the value only if the version argument is greater than the own version -
snapshot
long[] snapshot() -
update
-
toString
-