public interface DistributedCounter extends SyncPrimitive
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long delta)
Atomically adds the given value to the current value.
|
AsyncDistributedCounter |
async()
Returns the underlying asynchronous primitive.
|
long |
decrementAndGet()
Atomically decrement by one and return the updated value.
|
long |
get()
Returns the current value of the counter without modifying it.
|
long |
getAndAdd(long delta)
Atomically adds the given value to the current value.
|
long |
getAndDecrement()
Atomically decrement by one and return the previous value.
|
long |
getAndIncrement()
Atomically increment by one and return the previous value.
|
long |
incrementAndGet()
Atomically increment by one and return the updated value.
|
close, deleteaddStateChangeListener, name, protocol, removeStateChangeListener, typelong incrementAndGet()
long decrementAndGet()
long getAndIncrement()
long getAndDecrement()
long getAndAdd(long delta)
delta - the value to addlong addAndGet(long delta)
delta - the value to addlong get()
AsyncDistributedCounter async()
SyncPrimitiveasync in interface SyncPrimitiveCopyright © 2013–2018. All rights reserved.