Class AtomixAtomicCounterMap<K>
- java.lang.Object
-
- org.onosproject.store.atomix.primitives.impl.AtomixAtomicCounterMap<K>
-
- All Implemented Interfaces:
org.onosproject.store.service.AsyncAtomicCounterMap<K>,org.onosproject.store.service.DistributedPrimitive
public class AtomixAtomicCounterMap<K> extends Object implements org.onosproject.store.service.AsyncAtomicCounterMap<K>
Atomix atomic counter map.
-
-
Constructor Summary
Constructors Constructor Description AtomixAtomicCounterMap(io.atomix.core.map.AsyncAtomicCounterMap<K> atomixMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Long>addAndGet(K key, long delta)CompletableFuture<Void>clear()CompletableFuture<Long>decrementAndGet(K key)CompletableFuture<Long>get(K key)CompletableFuture<Long>getAndAdd(K key, long delta)CompletableFuture<Long>getAndDecrement(K key)CompletableFuture<Long>getAndIncrement(K key)CompletableFuture<Long>incrementAndGet(K key)CompletableFuture<Boolean>isEmpty()Stringname()CompletableFuture<Long>put(K key, long newValue)CompletableFuture<Long>putIfAbsent(K key, long newValue)CompletableFuture<Long>remove(K key)CompletableFuture<Boolean>remove(K key, long value)CompletableFuture<Boolean>replace(K key, long expectedOldValue, long newValue)CompletableFuture<Integer>size()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
AtomixAtomicCounterMap
public AtomixAtomicCounterMap(io.atomix.core.map.AsyncAtomicCounterMap<K> atomixMap)
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
incrementAndGet
public CompletableFuture<Long> incrementAndGet(K key)
- Specified by:
incrementAndGetin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
decrementAndGet
public CompletableFuture<Long> decrementAndGet(K key)
- Specified by:
decrementAndGetin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
getAndIncrement
public CompletableFuture<Long> getAndIncrement(K key)
- Specified by:
getAndIncrementin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
getAndDecrement
public CompletableFuture<Long> getAndDecrement(K key)
- Specified by:
getAndDecrementin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
addAndGet
public CompletableFuture<Long> addAndGet(K key, long delta)
- Specified by:
addAndGetin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
getAndAdd
public CompletableFuture<Long> getAndAdd(K key, long delta)
- Specified by:
getAndAddin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
get
public CompletableFuture<Long> get(K key)
- Specified by:
getin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
put
public CompletableFuture<Long> put(K key, long newValue)
- Specified by:
putin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
putIfAbsent
public CompletableFuture<Long> putIfAbsent(K key, long newValue)
- Specified by:
putIfAbsentin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
replace
public CompletableFuture<Boolean> replace(K key, long expectedOldValue, long newValue)
- Specified by:
replacein interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
remove
public CompletableFuture<Long> remove(K key)
- Specified by:
removein interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
remove
public CompletableFuture<Boolean> remove(K key, long value)
- Specified by:
removein interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
size
public CompletableFuture<Integer> size()
- Specified by:
sizein interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
isEmpty
public CompletableFuture<Boolean> isEmpty()
- Specified by:
isEmptyin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
clear
public CompletableFuture<Void> clear()
- Specified by:
clearin interfaceorg.onosproject.store.service.AsyncAtomicCounterMap<K>
-
-