Class 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 Detail

      • AtomixConsistentTreeMap

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

      • name

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public CompletableFuture<NavigableMap<String,​V>> subMap​(String upperKey,
                                                                      String lowerKey,
                                                                      boolean inclusiveUpper,
                                                                      boolean inclusiveLower)
        Specified by:
        subMap in interface org.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)
        Specified by:
        computeIf in interface org.onosproject.store.service.AsyncConsistentMap<String,​V>
      • put

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

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

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

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

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

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

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

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

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

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

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

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

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

        public 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 CompletableFuture<Boolean> prepare​(org.onosproject.store.service.TransactionLog<org.onosproject.store.primitives.MapUpdate<String,​V>> transactionLog)
        Specified by:
        prepare in interface org.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:
        prepareAndCommit in interface org.onosproject.store.service.Transactional<V>
      • commit

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

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