Atomically sets the value to the given updated value only if the current value equals the expected value.
true if successful; or false if the actual value
was not equal to the expected value.
the expected value
the new value
Generated using TypeDoc
IAtomicLong is a redundant and highly available distributed counter for 64-bit integers (
longtype 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-stateserver-side setting.