public interface AsyncAtomicCounter extends DistributedPrimitive
DistributedPrimitive.Status, DistributedPrimitive.TypeDEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description | 
|---|---|
CompletableFuture<Long> | 
addAndGet(long delta)
Atomically adds the given value to the current value. 
 | 
default AtomicCounter | 
asAtomicCounter()
Returns a new  
AtomicCounter that is backed by this instance and with a default operation timeout. | 
default AtomicCounter | 
asAtomicCounter(long timeoutMillis)
Returns a new  
AtomicCounter that is backed by this instance. | 
CompletableFuture<Boolean> | 
compareAndSet(long expectedValue,
             long updateValue)
Atomically sets the given counter to the updated value if the current value is the expected value, otherwise
 no change occurs. 
 | 
CompletableFuture<Long> | 
get()
Returns the current value of the counter without modifying it. 
 | 
CompletableFuture<Long> | 
getAndAdd(long delta)
Atomically adds the given value to the current value. 
 | 
CompletableFuture<Long> | 
getAndIncrement()
Atomically increment by one the current value. 
 | 
CompletableFuture<Long> | 
incrementAndGet()
Atomically increment by one the current value. 
 | 
default DistributedPrimitive.Type | 
primitiveType()
Returns the type of primitive. 
 | 
CompletableFuture<Void> | 
set(long value)
Atomically sets the given value to the current value. 
 | 
addStatusChangeListener, applicationId, destroy, name, removeStatusChangeListener, statusChangeListenersdefault DistributedPrimitive.Type primitiveType()
DistributedPrimitiveprimitiveType in interface DistributedPrimitiveCompletableFuture<Long> incrementAndGet()
CompletableFuture<Long> getAndIncrement()
CompletableFuture<Long> getAndAdd(long delta)
delta - the value to addCompletableFuture<Long> addAndGet(long delta)
delta - the value to addCompletableFuture<Long> get()
CompletableFuture<Void> set(long value)
value - new valueCompletableFuture<Boolean> compareAndSet(long expectedValue, long updateValue)
expectedValue - the expected current value of the counterupdateValue - the new value to be setdefault AtomicCounter asAtomicCounter(long timeoutMillis)
AtomicCounter that is backed by this instance.timeoutMillis - timeout duration for the returned ConsistentMap operationsConsistentMap instancedefault AtomicCounter asAtomicCounter()
AtomicCounter that is backed by this instance and with a default operation timeout.ConsistentMap instance