Class AtomixConsistentTreeMap<V>
- java.lang.Object
-
- org.onosproject.store.atomix.primitives.impl.AtomixConsistentTreeMap<V>
-
- All Implemented Interfaces:
org.onosproject.store.service.AsyncConsistentMap<String,V>,org.onosproject.store.service.AsyncConsistentTreeMap<V>,org.onosproject.store.service.AsyncIterable<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>,org.onosproject.store.service.DistributedPrimitive,org.onosproject.store.service.Transactional<org.onosproject.store.primitives.MapUpdate<String,V>>
public class AtomixConsistentTreeMap<V> extends Object implements org.onosproject.store.service.AsyncConsistentTreeMap<V>
Atomix consistent tree map.
-
-
Constructor Summary
Constructors Constructor Description AtomixConsistentTreeMap(io.atomix.core.map.AsyncAtomicNavigableMap<String,V> atomixTreeMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>addListener(org.onosproject.store.service.MapEventListener<String,V> listener, Executor executor)CompletableFuture<org.onosproject.store.service.Version>begin(org.onosproject.store.primitives.TransactionId transactionId)CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>ceilingEntry(String key)CompletableFuture<String>ceilingKey(String key)CompletableFuture<Void>clear()CompletableFuture<Void>commit(org.onosproject.store.primitives.TransactionId transactionId)CompletableFuture<org.onosproject.store.service.Versioned<V>>computeIf(String key, Predicate<? super V> condition, BiFunction<? super String,? super V,? extends V> remappingFunction)CompletableFuture<Boolean>containsKey(String key)CompletableFuture<Boolean>containsValue(V value)CompletableFuture<Set<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>>entrySet()CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>firstEntry()CompletableFuture<String>firstKey()CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>floorEntry(String key)CompletableFuture<String>floorKey(String key)CompletableFuture<org.onosproject.store.service.Versioned<V>>get(String key)CompletableFuture<org.onosproject.store.service.Versioned<V>>getOrDefault(String key, V defaultValue)CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>higherEntry(String key)CompletableFuture<String>higherKey(String key)CompletableFuture<org.onosproject.store.service.AsyncIterator<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>>iterator()CompletableFuture<Set<String>>keySet()CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>lastEntry()CompletableFuture<String>lastKey()CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>lowerEntry(String key)CompletableFuture<String>lowerKey(String key)Stringname()CompletableFuture<NavigableSet<String>>navigableKeySet()CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>pollFirstEntry()CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>pollLastEntry()CompletableFuture<Boolean>prepare(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<String,V>> transactionLog)CompletableFuture<Boolean>prepareAndCommit(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<String,V>> transactionLog)CompletableFuture<org.onosproject.store.service.Versioned<V>>put(String key, V value)CompletableFuture<org.onosproject.store.service.Versioned<V>>putAndGet(String key, V value)CompletableFuture<org.onosproject.store.service.Versioned<V>>putIfAbsent(String key, V value)CompletableFuture<org.onosproject.store.service.Versioned<V>>remove(String key)CompletableFuture<Boolean>remove(String key, long version)CompletableFuture<Boolean>remove(String key, V value)CompletableFuture<Void>removeListener(org.onosproject.store.service.MapEventListener<String,V> listener)CompletableFuture<Boolean>replace(String key, long oldVersion, V newValue)CompletableFuture<org.onosproject.store.service.Versioned<V>>replace(String key, V value)CompletableFuture<Boolean>replace(String key, V oldValue, V newValue)CompletableFuture<Void>rollback(org.onosproject.store.primitives.TransactionId transactionId)CompletableFuture<Integer>size()CompletableFuture<NavigableMap<String,V>>subMap(String upperKey, String lowerKey, boolean inclusiveUpper, boolean inclusiveLower)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
-
Methods inherited from interface org.onosproject.store.service.AsyncConsistentMap
addListener, asConsistentMap, asConsistentMap, compute, computeIfAbsent, computeIfPresent, destroy, isEmpty, primitiveType
-
-
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
size
public CompletableFuture<Integer> size()
-
firstKey
public CompletableFuture<String> firstKey()
- Specified by:
firstKeyin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
lastKey
public CompletableFuture<String> lastKey()
- Specified by:
lastKeyin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
ceilingEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> ceilingEntry(String key)
- Specified by:
ceilingEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
floorEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> floorEntry(String key)
- Specified by:
floorEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
higherEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> higherEntry(String key)
- Specified by:
higherEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
lowerEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> lowerEntry(String key)
- Specified by:
lowerEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
firstEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> firstEntry()
- Specified by:
firstEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
lastEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> lastEntry()
- Specified by:
lastEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
pollFirstEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> pollFirstEntry()
- Specified by:
pollFirstEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
pollLastEntry
public CompletableFuture<Map.Entry<String,org.onosproject.store.service.Versioned<V>>> pollLastEntry()
- Specified by:
pollLastEntryin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
containsKey
public CompletableFuture<Boolean> containsKey(String key)
-
lowerKey
public CompletableFuture<String> lowerKey(String key)
- Specified by:
lowerKeyin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
floorKey
public CompletableFuture<String> floorKey(String key)
- Specified by:
floorKeyin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
ceilingKey
public CompletableFuture<String> ceilingKey(String key)
- Specified by:
ceilingKeyin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
get
public CompletableFuture<org.onosproject.store.service.Versioned<V>> get(String key)
-
higherKey
public CompletableFuture<String> higherKey(String key)
- Specified by:
higherKeyin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
navigableKeySet
public CompletableFuture<NavigableSet<String>> navigableKeySet()
- Specified by:
navigableKeySetin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
getOrDefault
public CompletableFuture<org.onosproject.store.service.Versioned<V>> getOrDefault(String key, V defaultValue)
-
subMap
public CompletableFuture<NavigableMap<String,V>> subMap(String upperKey, String lowerKey, boolean inclusiveUpper, boolean inclusiveLower)
- Specified by:
subMapin interfaceorg.onosproject.store.service.AsyncConsistentTreeMap<V>
-
computeIf
public CompletableFuture<org.onosproject.store.service.Versioned<V>> computeIf(String key, Predicate<? super V> condition, BiFunction<? super String,? super V,? extends V> remappingFunction)
-
put
public CompletableFuture<org.onosproject.store.service.Versioned<V>> put(String key, V value)
-
putAndGet
public CompletableFuture<org.onosproject.store.service.Versioned<V>> putAndGet(String key, V value)
-
remove
public CompletableFuture<org.onosproject.store.service.Versioned<V>> remove(String key)
-
keySet
public CompletableFuture<Set<String>> keySet()
-
entrySet
public CompletableFuture<Set<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>> entrySet()
-
putIfAbsent
public CompletableFuture<org.onosproject.store.service.Versioned<V>> putIfAbsent(String key, V value)
-
remove
public CompletableFuture<Boolean> remove(String key, V value)
-
remove
public CompletableFuture<Boolean> remove(String key, long version)
-
replace
public CompletableFuture<org.onosproject.store.service.Versioned<V>> replace(String key, V value)
-
replace
public CompletableFuture<Boolean> replace(String key, V oldValue, V newValue)
-
replace
public CompletableFuture<Boolean> replace(String key, long oldVersion, V newValue)
-
containsValue
public CompletableFuture<Boolean> containsValue(V value)
-
iterator
public CompletableFuture<org.onosproject.store.service.AsyncIterator<Map.Entry<String,org.onosproject.store.service.Versioned<V>>>> iterator()
- Specified by:
iteratorin interfaceorg.onosproject.store.service.AsyncIterable<V>
-
clear
public CompletableFuture<Void> clear()
-
values
public CompletableFuture<Collection<org.onosproject.store.service.Versioned<V>>> values()
-
addListener
public CompletableFuture<Void> addListener(org.onosproject.store.service.MapEventListener<String,V> listener, Executor executor)
-
removeListener
public CompletableFuture<Void> removeListener(org.onosproject.store.service.MapEventListener<String,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<V>
-
prepare
public CompletableFuture<Boolean> prepare(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<String,V>> transactionLog)
- Specified by:
preparein interfaceorg.onosproject.store.service.Transactional<V>
-
prepareAndCommit
public CompletableFuture<Boolean> prepareAndCommit(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<String,V>> transactionLog)
- Specified by:
prepareAndCommitin interfaceorg.onosproject.store.service.Transactional<V>
-
commit
public CompletableFuture<Void> commit(org.onosproject.store.primitives.TransactionId transactionId)
- Specified by:
commitin interfaceorg.onosproject.store.service.Transactional<V>
-
rollback
public CompletableFuture<Void> rollback(org.onosproject.store.primitives.TransactionId transactionId)
- Specified by:
rollbackin interfaceorg.onosproject.store.service.Transactional<V>
-
-