Class EventuallyConsistentMapImpl<K,V>
- java.lang.Object
-
- org.onosproject.store.atomix.primitives.impl.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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(org.onosproject.store.service.EventuallyConsistentMapListener<K,V> listener)voidclear()Vcompute(K key, java.util.function.BiFunction<K,V,V> recomputeFunction)booleancontainsKey(K key)booleancontainsValue(V value)java.util.concurrent.CompletableFuture<java.lang.Void>destroy()java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(K key)booleanisEmpty()java.util.Set<K>keySet()java.lang.Stringname()voidput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)Vremove(K key)voidremove(K key, V value)voidremoveListener(org.onosproject.store.service.EventuallyConsistentMapListener<K,V> listener)intsize()java.util.Collection<V>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
name
public java.lang.String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(K key)
-
containsValue
public boolean containsValue(V value)
-
clear
public void clear()
-
keySet
public java.util.Set<K> keySet()
-
values
public java.util.Collection<V> values()
-
addListener
public void addListener(org.onosproject.store.service.EventuallyConsistentMapListener<K,V> listener)
-
removeListener
public void removeListener(org.onosproject.store.service.EventuallyConsistentMapListener<K,V> listener)
-
destroy
public java.util.concurrent.CompletableFuture<java.lang.Void> destroy()
- Specified by:
destroyin interfaceorg.onosproject.store.service.DistributedPrimitive
-
-