public class DefaultAsyncAtomicCounter extends Object implements org.onosproject.store.service.AsyncAtomicCounter
The initial value will be zero.
| Constructor and Description |
|---|
DefaultAsyncAtomicCounter(String name,
Database database,
boolean retryOnException,
ScheduledExecutorService retryExecutor) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Long> |
addAndGet(long delta) |
CompletableFuture<Long> |
get() |
CompletableFuture<Long> |
getAndAdd(long delta) |
CompletableFuture<Long> |
getAndIncrement() |
CompletableFuture<Long> |
incrementAndGet() |
public DefaultAsyncAtomicCounter(String name, Database database, boolean retryOnException, ScheduledExecutorService retryExecutor)
public CompletableFuture<Long> incrementAndGet()
incrementAndGet in interface org.onosproject.store.service.AsyncAtomicCounterpublic CompletableFuture<Long> get()
get 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.AsyncAtomicCounterCopyright © 2015. All rights reserved.