Class AtomixConsistentMap<K,V>
- java.lang.Object
-
- org.onosproject.store.atomix.primitives.impl.AtomixConsistentMap<K,V>
-
- All Implemented Interfaces:
org.onosproject.store.service.AsyncConsistentMap<K,V>,org.onosproject.store.service.AsyncIterable<Map.Entry<K,org.onosproject.store.service.Versioned<V>>>,org.onosproject.store.service.DistributedPrimitive,org.onosproject.store.service.Transactional<org.onosproject.store.primitives.MapUpdate<K,V>>
public class AtomixConsistentMap<K,V> extends Object implements org.onosproject.store.service.AsyncConsistentMap<K,V>
Atomix consistent map.
-
-
Constructor Summary
Constructors Constructor Description AtomixConsistentMap(io.atomix.core.map.AsyncAtomicMap<K,V> atomixMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>addListener(org.onosproject.store.service.MapEventListener<K,V> listener, Executor executor)CompletableFuture<org.onosproject.store.service.Version>begin(org.onosproject.store.primitives.TransactionId transactionId)CompletableFuture<Void>clear()CompletableFuture<Void>commit(org.onosproject.store.primitives.TransactionId transactionId)CompletableFuture<org.onosproject.store.service.Versioned<V>>computeIf(K key, Predicate<? super V> condition, BiFunction<? super K,? super V,? extends V> remappingFunction)CompletableFuture<Boolean>containsKey(K key)CompletableFuture<Boolean>containsValue(V value)CompletableFuture<Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>>>entrySet()CompletableFuture<org.onosproject.store.service.Versioned<V>>get(K key)CompletableFuture<org.onosproject.store.service.Versioned<V>>getOrDefault(K key, V defaultValue)CompletableFuture<org.onosproject.store.service.AsyncIterator<Map.Entry<K,org.onosproject.store.service.Versioned<V>>>>iterator()CompletableFuture<Set<K>>keySet()Stringname()CompletableFuture<Boolean>prepare(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<K,V>> transactionLog)CompletableFuture<Boolean>prepareAndCommit(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<K,V>> transactionLog)CompletableFuture<org.onosproject.store.service.Versioned<V>>put(K key, V value)CompletableFuture<org.onosproject.store.service.Versioned<V>>putAndGet(K key, V value)CompletableFuture<org.onosproject.store.service.Versioned<V>>putIfAbsent(K key, V value)CompletableFuture<org.onosproject.store.service.Versioned<V>>remove(K key)CompletableFuture<Boolean>remove(K key, long version)CompletableFuture<Boolean>remove(K key, V value)CompletableFuture<Void>removeListener(org.onosproject.store.service.MapEventListener<K,V> listener)CompletableFuture<Boolean>replace(K key, long oldVersion, V newValue)CompletableFuture<org.onosproject.store.service.Versioned<V>>replace(K key, V value)CompletableFuture<Boolean>replace(K key, V oldValue, V newValue)CompletableFuture<Void>rollback(org.onosproject.store.primitives.TransactionId transactionId)CompletableFuture<Integer>size()CompletableFuture<Collection<org.onosproject.store.service.Versioned<V>>>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
size
public CompletableFuture<Integer> size()
-
containsKey
public CompletableFuture<Boolean> containsKey(K key)
-
containsValue
public CompletableFuture<Boolean> containsValue(V value)
-
get
public CompletableFuture<org.onosproject.store.service.Versioned<V>> get(K key)
-
getOrDefault
public CompletableFuture<org.onosproject.store.service.Versioned<V>> getOrDefault(K key, V defaultValue)
-
computeIf
public CompletableFuture<org.onosproject.store.service.Versioned<V>> computeIf(K key, Predicate<? super V> condition, BiFunction<? super K,? super V,? extends V> remappingFunction)
-
put
public CompletableFuture<org.onosproject.store.service.Versioned<V>> put(K key, V value)
-
putAndGet
public CompletableFuture<org.onosproject.store.service.Versioned<V>> putAndGet(K key, V value)
-
remove
public CompletableFuture<org.onosproject.store.service.Versioned<V>> remove(K key)
-
clear
public CompletableFuture<Void> clear()
-
keySet
public CompletableFuture<Set<K>> keySet()
-
values
public CompletableFuture<Collection<org.onosproject.store.service.Versioned<V>>> values()
-
entrySet
public CompletableFuture<Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>>> entrySet()
-
putIfAbsent
public CompletableFuture<org.onosproject.store.service.Versioned<V>> putIfAbsent(K key, V value)
-
remove
public CompletableFuture<Boolean> remove(K key, V value)
-
remove
public CompletableFuture<Boolean> remove(K key, long version)
-
replace
public CompletableFuture<org.onosproject.store.service.Versioned<V>> replace(K key, V value)
-
replace
public CompletableFuture<Boolean> replace(K key, V oldValue, V newValue)
-
replace
public CompletableFuture<Boolean> replace(K key, long oldVersion, V newValue)
-
iterator
public CompletableFuture<org.onosproject.store.service.AsyncIterator<Map.Entry<K,org.onosproject.store.service.Versioned<V>>>> iterator()
- Specified by:
iteratorin interfaceorg.onosproject.store.service.AsyncIterable<K>
-
addListener
public CompletableFuture<Void> addListener(org.onosproject.store.service.MapEventListener<K,V> listener, Executor executor)
-
removeListener
public CompletableFuture<Void> removeListener(org.onosproject.store.service.MapEventListener<K,V> listener)
-
begin
public CompletableFuture<org.onosproject.store.service.Version> begin(org.onosproject.store.primitives.TransactionId transactionId)
- Specified by:
beginin interfaceorg.onosproject.store.service.Transactional<K>
-
prepare
public CompletableFuture<Boolean> prepare(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<K,V>> transactionLog)
- Specified by:
preparein interfaceorg.onosproject.store.service.Transactional<K>
-
prepareAndCommit
public CompletableFuture<Boolean> prepareAndCommit(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<K,V>> transactionLog)
- Specified by:
prepareAndCommitin interfaceorg.onosproject.store.service.Transactional<K>
-
commit
public CompletableFuture<Void> commit(org.onosproject.store.primitives.TransactionId transactionId)
- Specified by:
commitin interfaceorg.onosproject.store.service.Transactional<K>
-
rollback
public CompletableFuture<Void> rollback(org.onosproject.store.primitives.TransactionId transactionId)
- Specified by:
rollbackin interfaceorg.onosproject.store.service.Transactional<K>
-
-