Class EventuallyConsistentMapImpl<K,​V>

  • All Implemented Interfaces:
    org.onosproject.store.service.DistributedPrimitive, org.onosproject.store.service.EventuallyConsistentMap<K,​V>

    public class EventuallyConsistentMapImpl<K,​V>
    extends java.lang.Object
    implements org.onosproject.store.service.EventuallyConsistentMap<K,​V>
    Distributed Map implementation which uses optimistic replication and gossip based techniques to provide an eventually consistent data store.
    • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(org.onosproject.store.service.EventuallyConsistentMapListener<K,​V> listener)  
      void clear()  
      V compute​(K key, java.util.function.BiFunction<K,​V,​V> recomputeFunction)  
      boolean containsKey​(K key)  
      boolean containsValue​(V value)  
      java.util.concurrent.CompletableFuture<java.lang.Void> destroy()  
      java.util.Set<java.util.Map.Entry<K,​V>> entrySet()  
      V get​(K key)  
      boolean isEmpty()  
      java.util.Set<K> keySet()  
      java.lang.String name()  
      void put​(K key, V value)  
      void putAll​(java.util.Map<? extends K,​? extends V> m)  
      V remove​(K key)  
      void remove​(K key, V value)  
      void removeListener​(org.onosproject.store.service.EventuallyConsistentMapListener<K,​V> listener)  
      int size()  
      java.util.Collection<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.DistributedPrimitive

        addStatusChangeListener, applicationId, removeStatusChangeListener, statusChangeListeners
      • Methods inherited from interface org.onosproject.store.service.EventuallyConsistentMap

        primitiveType
    • Method Detail

      • name

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

        public int size()
        Specified by:
        size in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • containsKey

        public boolean containsKey​(K key)
        Specified by:
        containsKey in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • containsValue

        public boolean containsValue​(V value)
        Specified by:
        containsValue in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • get

        public V get​(K key)
        Specified by:
        get in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • put

        public void put​(K key,
                        V value)
        Specified by:
        put in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • remove

        public V remove​(K key)
        Specified by:
        remove in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • remove

        public void remove​(K key,
                           V value)
        Specified by:
        remove in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • compute

        public V compute​(K key,
                         java.util.function.BiFunction<K,​V,​V> recomputeFunction)
        Specified by:
        compute in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends V> m)
        Specified by:
        putAll in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • keySet

        public java.util.Set<K> keySet()
        Specified by:
        keySet in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • values

        public java.util.Collection<V> values()
        Specified by:
        values in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • addListener

        public void addListener​(org.onosproject.store.service.EventuallyConsistentMapListener<K,​V> listener)
        Specified by:
        addListener in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • removeListener

        public void removeListener​(org.onosproject.store.service.EventuallyConsistentMapListener<K,​V> listener)
        Specified by:
        removeListener in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • destroy

        public java.util.concurrent.CompletableFuture<java.lang.Void> destroy()
        Specified by:
        destroy in interface org.onosproject.store.service.DistributedPrimitive