public class AtomixAtomicCounterMap extends io.atomix.resource.AbstractResource<AtomixAtomicCounterMap> implements org.onosproject.store.service.AsyncAtomicCounterMap<String>
AsyncAtomicCounterMap implementation backed by Atomix.| Constructor and Description |
|---|
AtomixAtomicCounterMap(io.atomix.copycat.client.CopycatClient client,
Properties options) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Long> |
addAndGet(String key,
long delta) |
CompletableFuture<Void> |
clear() |
CompletableFuture<Long> |
decrementAndGet(String key) |
CompletableFuture<Long> |
get(String key) |
CompletableFuture<Long> |
getAndAdd(String key,
long delta) |
CompletableFuture<Long> |
getAndDecrement(String key) |
CompletableFuture<Long> |
getAndIncrement(String key) |
CompletableFuture<Long> |
incrementAndGet(String key) |
CompletableFuture<Boolean> |
isEmpty() |
String |
name() |
CompletableFuture<Long> |
put(String key,
long newValue) |
CompletableFuture<Long> |
putIfAbsent(String key,
long newValue) |
CompletableFuture<Long> |
remove(String key) |
CompletableFuture<Boolean> |
remove(String key,
long value) |
CompletableFuture<Boolean> |
replace(String key,
long expectedOldValue,
long newValue) |
CompletableFuture<Integer> |
size() |
close, config, context, delete, equals, hashCode, isClosed, isOpen, onEvent, onRecovery, onStateChange, open, options, recover, serializer, state, toString, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic AtomixAtomicCounterMap(io.atomix.copycat.client.CopycatClient client,
Properties options)
public String name()
name in interface org.onosproject.store.service.DistributedPrimitivepublic CompletableFuture<Long> incrementAndGet(String key)
incrementAndGet in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> decrementAndGet(String key)
decrementAndGet in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> getAndIncrement(String key)
getAndIncrement in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> getAndDecrement(String key)
getAndDecrement in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> addAndGet(String key, long delta)
addAndGet in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> getAndAdd(String key, long delta)
getAndAdd in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> get(String key)
get in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> put(String key, long newValue)
put in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> putIfAbsent(String key, long newValue)
putIfAbsent in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Boolean> replace(String key, long expectedOldValue, long newValue)
replace in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Long> remove(String key)
remove in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Boolean> remove(String key, long value)
remove in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Integer> size()
size in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Boolean> isEmpty()
isEmpty in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>public CompletableFuture<Void> clear()
clear in interface org.onosproject.store.service.AsyncAtomicCounterMap<String>