Class AtomixConsistentTreeMap<V>

  • All Implemented Interfaces:
    org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>, org.onosproject.store.service.AsyncConsistentTreeMap<V>, org.onosproject.store.service.AsyncIterable<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>>, org.onosproject.store.service.DistributedPrimitive, org.onosproject.store.service.Transactional<org.onosproject.store.primitives.MapUpdate<java.lang.String,​V>>

    public class AtomixConsistentTreeMap<V>
    extends java.lang.Object
    implements org.onosproject.store.service.AsyncConsistentTreeMap<V>
    Atomix consistent tree map.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.onosproject.store.service.DistributedPrimitive

        org.onosproject.store.service.DistributedPrimitive.Status, org.onosproject.store.service.DistributedPrimitive.Type
    • Field Summary

      • Fields inherited from interface org.onosproject.store.service.DistributedPrimitive

        DEFAULT_OPERATION_TIMEOUT_MILLIS
    • Constructor Summary

      Constructors 
      Constructor Description
      AtomixConsistentTreeMap​(io.atomix.core.map.AsyncAtomicNavigableMap<java.lang.String,​V> atomixTreeMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.Void> addListener​(org.onosproject.store.service.MapEventListener<java.lang.String,​V> listener, java.util.concurrent.Executor executor)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Version> begin​(org.onosproject.store.primitives.TransactionId transactionId)  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> ceilingEntry​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<java.lang.String> ceilingKey​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<java.lang.Void> clear()  
      java.util.concurrent.CompletableFuture<java.lang.Void> commit​(org.onosproject.store.primitives.TransactionId transactionId)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> computeIf​(java.lang.String key, java.util.function.Predicate<? super V> condition, java.util.function.BiFunction<? super java.lang.String,​? super V,​? extends V> remappingFunction)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> containsKey​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> containsValue​(V value)  
      java.util.concurrent.CompletableFuture<java.util.Set<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>>> entrySet()  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> firstEntry()  
      java.util.concurrent.CompletableFuture<java.lang.String> firstKey()  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> floorEntry​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<java.lang.String> floorKey​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> get​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> getOrDefault​(java.lang.String key, V defaultValue)  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> higherEntry​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<java.lang.String> higherKey​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.AsyncIterator<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>>> iterator()  
      java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> keySet()  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> lastEntry()  
      java.util.concurrent.CompletableFuture<java.lang.String> lastKey()  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> lowerEntry​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<java.lang.String> lowerKey​(java.lang.String key)  
      java.lang.String name()  
      java.util.concurrent.CompletableFuture<java.util.NavigableSet<java.lang.String>> navigableKeySet()  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> pollFirstEntry()  
      java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> pollLastEntry()  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> prepare​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<java.lang.String,​V>> transactionLog)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> prepareAndCommit​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<java.lang.String,​V>> transactionLog)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> put​(java.lang.String key, V value)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> putAndGet​(java.lang.String key, V value)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> putIfAbsent​(java.lang.String key, V value)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> remove​(java.lang.String key)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> remove​(java.lang.String key, long version)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> remove​(java.lang.String key, V value)  
      java.util.concurrent.CompletableFuture<java.lang.Void> removeListener​(org.onosproject.store.service.MapEventListener<java.lang.String,​V> listener)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(java.lang.String key, long oldVersion, V newValue)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> replace​(java.lang.String key, V value)  
      java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(java.lang.String key, V oldValue, V newValue)  
      java.util.concurrent.CompletableFuture<java.lang.Void> rollback​(org.onosproject.store.primitives.TransactionId transactionId)  
      java.util.concurrent.CompletableFuture<java.lang.Integer> size()  
      java.util.concurrent.CompletableFuture<java.util.NavigableMap<java.lang.String,​V>> subMap​(java.lang.String upperKey, java.lang.String lowerKey, boolean inclusiveUpper, boolean inclusiveLower)  
      java.util.concurrent.CompletableFuture<java.util.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
      • Methods inherited from interface org.onosproject.store.service.AsyncConsistentTreeMap

        asTreeMap, asTreeMap
      • Methods inherited from interface org.onosproject.store.service.DistributedPrimitive

        addStatusChangeListener, applicationId, removeStatusChangeListener, statusChangeListeners
    • Constructor Detail

      • AtomixConsistentTreeMap

        public AtomixConsistentTreeMap​(io.atomix.core.map.AsyncAtomicNavigableMap<java.lang.String,​V> atomixTreeMap)
    • Method Detail

      • name

        public java.lang.String name()
        Specified by:
        name in interface org.onosproject.store.service.DistributedPrimitive
      • size

        public java.util.concurrent.CompletableFuture<java.lang.Integer> size()
        Specified by:
        size in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • firstKey

        public java.util.concurrent.CompletableFuture<java.lang.String> firstKey()
        Specified by:
        firstKey in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • lastKey

        public java.util.concurrent.CompletableFuture<java.lang.String> lastKey()
        Specified by:
        lastKey in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • ceilingEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> ceilingEntry​(java.lang.String key)
        Specified by:
        ceilingEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • floorEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> floorEntry​(java.lang.String key)
        Specified by:
        floorEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • higherEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> higherEntry​(java.lang.String key)
        Specified by:
        higherEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • lowerEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> lowerEntry​(java.lang.String key)
        Specified by:
        lowerEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • firstEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> firstEntry()
        Specified by:
        firstEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • lastEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> lastEntry()
        Specified by:
        lastEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • pollFirstEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> pollFirstEntry()
        Specified by:
        pollFirstEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • pollLastEntry

        public java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>> pollLastEntry()
        Specified by:
        pollLastEntry in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • containsKey

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> containsKey​(java.lang.String key)
        Specified by:
        containsKey in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • lowerKey

        public java.util.concurrent.CompletableFuture<java.lang.String> lowerKey​(java.lang.String key)
        Specified by:
        lowerKey in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • floorKey

        public java.util.concurrent.CompletableFuture<java.lang.String> floorKey​(java.lang.String key)
        Specified by:
        floorKey in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • ceilingKey

        public java.util.concurrent.CompletableFuture<java.lang.String> ceilingKey​(java.lang.String key)
        Specified by:
        ceilingKey in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • get

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> get​(java.lang.String key)
        Specified by:
        get in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • higherKey

        public java.util.concurrent.CompletableFuture<java.lang.String> higherKey​(java.lang.String key)
        Specified by:
        higherKey in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • navigableKeySet

        public java.util.concurrent.CompletableFuture<java.util.NavigableSet<java.lang.String>> navigableKeySet()
        Specified by:
        navigableKeySet in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • getOrDefault

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> getOrDefault​(java.lang.String key,
                                                                                                               V defaultValue)
        Specified by:
        getOrDefault in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • subMap

        public java.util.concurrent.CompletableFuture<java.util.NavigableMap<java.lang.String,​V>> subMap​(java.lang.String upperKey,
                                                                                                               java.lang.String lowerKey,
                                                                                                               boolean inclusiveUpper,
                                                                                                               boolean inclusiveLower)
        Specified by:
        subMap in interface org.onosproject.store.service.AsyncConsistentTreeMap<V>
      • computeIf

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> computeIf​(java.lang.String key,
                                                                                                            java.util.function.Predicate<? super V> condition,
                                                                                                            java.util.function.BiFunction<? super java.lang.String,​? super V,​? extends V> remappingFunction)
        Specified by:
        computeIf in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • put

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> put​(java.lang.String key,
                                                                                                      V value)
        Specified by:
        put in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • putAndGet

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> putAndGet​(java.lang.String key,
                                                                                                            V value)
        Specified by:
        putAndGet in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • remove

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> remove​(java.lang.String key)
        Specified by:
        remove in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • keySet

        public java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> keySet()
        Specified by:
        keySet in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • entrySet

        public java.util.concurrent.CompletableFuture<java.util.Set<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>>> entrySet()
        Specified by:
        entrySet in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • putIfAbsent

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> putIfAbsent​(java.lang.String key,
                                                                                                              V value)
        Specified by:
        putIfAbsent in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • remove

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> remove​(java.lang.String key,
                                                                                V value)
        Specified by:
        remove in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • remove

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> remove​(java.lang.String key,
                                                                                long version)
        Specified by:
        remove in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • replace

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Versioned<V>> replace​(java.lang.String key,
                                                                                                          V value)
        Specified by:
        replace in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • replace

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(java.lang.String key,
                                                                                 V oldValue,
                                                                                 V newValue)
        Specified by:
        replace in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • replace

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> replace​(java.lang.String key,
                                                                                 long oldVersion,
                                                                                 V newValue)
        Specified by:
        replace in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • containsValue

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> containsValue​(V value)
        Specified by:
        containsValue in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • iterator

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.AsyncIterator<java.util.Map.Entry<java.lang.String,​org.onosproject.store.service.Versioned<V>>>> iterator()
        Specified by:
        iterator in interface org.onosproject.store.service.AsyncIterable<V>
      • clear

        public java.util.concurrent.CompletableFuture<java.lang.Void> clear()
        Specified by:
        clear in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • values

        public java.util.concurrent.CompletableFuture<java.util.Collection<org.onosproject.store.service.Versioned<V>>> values()
        Specified by:
        values in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • addListener

        public java.util.concurrent.CompletableFuture<java.lang.Void> addListener​(org.onosproject.store.service.MapEventListener<java.lang.String,​V> listener,
                                                                                  java.util.concurrent.Executor executor)
        Specified by:
        addListener in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • removeListener

        public java.util.concurrent.CompletableFuture<java.lang.Void> removeListener​(org.onosproject.store.service.MapEventListener<java.lang.String,​V> listener)
        Specified by:
        removeListener in interface org.onosproject.store.service.AsyncConsistentMap<java.lang.String,​V>
      • begin

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.Version> begin​(org.onosproject.store.primitives.TransactionId transactionId)
        Specified by:
        begin in interface org.onosproject.store.service.Transactional<V>
      • prepare

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> prepare​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<java.lang.String,​V>> transactionLog)
        Specified by:
        prepare in interface org.onosproject.store.service.Transactional<V>
      • prepareAndCommit

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> prepareAndCommit​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<java.lang.String,​V>> transactionLog)
        Specified by:
        prepareAndCommit in interface org.onosproject.store.service.Transactional<V>
      • commit

        public java.util.concurrent.CompletableFuture<java.lang.Void> commit​(org.onosproject.store.primitives.TransactionId transactionId)
        Specified by:
        commit in interface org.onosproject.store.service.Transactional<V>
      • rollback

        public java.util.concurrent.CompletableFuture<java.lang.Void> rollback​(org.onosproject.store.primitives.TransactionId transactionId)
        Specified by:
        rollback in interface org.onosproject.store.service.Transactional<V>