Class DistributedAtomicInteger

All Implemented Interfaces:

public class DistributedAtomicInteger extends Object implements DistributedAtomicNumber<Integer>

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.