Atomically adds the given value to the current value.
the value to add to the current value
the updated value, the given value added to the current value
Atomically sets the value to the given updated value only if the current value equals the expected value.
the expected value
the new value
true
if successful; or false
if the actual value
was not equal to the expected value.
Atomically decrements the current value by one.
the updated value, the current value decremented by one
Destroys this object cluster-wide. Clears all resources taken for this object.
Gets the current value.
the current value
Atomically adds the given value to the current value.
the value to add to the current value
the old value before the add
Atomically decrements the current value by one.
the old value
Atomically increments the current value by one.
the old value
Atomically sets the given value and returns the old value.
the new value
the old value
Returns the unique name of this object.
Returns the key of the partition that this DistributedObject is assigned to.
For a partitioned data structure, the returned value will not be null
,
but otherwise undefined
.
Returns the service name for this object.
Atomically increments the current value by one.
the updated value, the current value incremented by one
Atomically sets the given value.
the new value
Generated using TypeDoc
IAtomicLong is a redundant and highly available distributed counter for 64-bit integers (
long
type in java).It works on top of the Raft consensus algorithm. It offers linearizability during crash failures and network partitions. It is CP with respect to the CAP principle. If a network partition occurs, it remains available on at most one side of the partition.
IAtomicLong implementation does not offer exactly-once / effectively-once execution semantics. It goes with at-least-once execution semantics by default and can cause an API call to be committed multiple times in case of CP member failures. It can be tuned to offer at-most-once execution semantics. Please see
fail-on-indeterminate-operation-state
server-side setting.