public class ExecutingAsyncAtomicCounter extends ExecutingDistributedPrimitive implements org.onosproject.store.service.AsyncAtomicCounter
AsyncAtomicCounter that executes asynchronous callbacks on a user provided
Executor.| Constructor and Description |
|---|
ExecutingAsyncAtomicCounter(org.onosproject.store.service.AsyncAtomicCounter delegateCounter,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Long> |
addAndGet(long delta) |
CompletableFuture<Boolean> |
compareAndSet(long expectedValue,
long updateValue) |
CompletableFuture<Long> |
get() |
CompletableFuture<Long> |
getAndAdd(long delta) |
CompletableFuture<Long> |
getAndIncrement() |
CompletableFuture<Long> |
incrementAndGet() |
CompletableFuture<Void> |
set(long value) |
addStatusChangeListener, destroy, removeStatusChangeListenerapplicationId, equals, hashCode, name, primitiveType, statusChangeListeners, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic ExecutingAsyncAtomicCounter(org.onosproject.store.service.AsyncAtomicCounter delegateCounter,
Executor executor)
public CompletableFuture<Long> incrementAndGet()
incrementAndGet in interface org.onosproject.store.service.AsyncAtomicCounterpublic CompletableFuture<Long> getAndIncrement()
getAndIncrement in interface org.onosproject.store.service.AsyncAtomicCounterpublic CompletableFuture<Long> getAndAdd(long delta)
getAndAdd in interface org.onosproject.store.service.AsyncAtomicCounterpublic CompletableFuture<Long> addAndGet(long delta)
addAndGet in interface org.onosproject.store.service.AsyncAtomicCounterpublic CompletableFuture<Long> get()
get in interface org.onosproject.store.service.AsyncAtomicCounterpublic CompletableFuture<Void> set(long value)
set in interface org.onosproject.store.service.AsyncAtomicCounterpublic CompletableFuture<Boolean> compareAndSet(long expectedValue, long updateValue)
compareAndSet in interface org.onosproject.store.service.AsyncAtomicCounter