Class DistributedAtomicLong

All Implemented Interfaces:

public class DistributedAtomicLong extends Object implements DistributedAtomicNumber<Long>

A counter that attempts atomic increments. It first tries uses optimistic locking. If that fails, an optional InterProcessMutex is taken. For both optimistic and mutex, a retry policy is used to retry the increment.

The various increment methods return an AtomicValue object. You must always check AtomicValue.succeeded(). None of the methods (other than get()) are guaranteed to succeed.