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 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.
    • Method Detail

      • name

        public 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,
                         BiFunction<K,​V,​V> recomputeFunction)
        Specified by:
        compute in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • putAll

        public void putAll​(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 Set<K> keySet()
        Specified by:
        keySet in interface org.onosproject.store.service.EventuallyConsistentMap<K,​V>
      • values

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

        public Set<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 CompletableFuture<Void> destroy()
        Specified by:
        destroy in interface org.onosproject.store.service.DistributedPrimitive