Package org.cyclos.impl.utils.cluster
Class MapReplicatedStorage<K,V>
- java.lang.Object
-
- org.cyclos.impl.utils.cluster.MapReplicatedStorage<K,V>
-
- All Implemented Interfaces:
ReplicatedStorage<K,V>,Storage<K,V>
public class MapReplicatedStorage<K,V> extends Object implements ReplicatedStorage<K,V>
A simple implementation ofReplicatedStorageusing aConcurrentHashMap
-
-
Constructor Summary
Constructors Constructor Description MapReplicatedStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all keysVget(K key)Returns the value associated with the given key, or null if not present.voidremove(K key)Removes the given key.voidremoveAll(Collection<K> keys)Removes all the given keys.voidset(K key, V value)Adds a value to the store
-
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:StorageRemoves all keys
-
get
public V get(K key)
Description copied from interface:StorageReturns the value associated with the given key, or null if not present.
-
removeAll
public void removeAll(Collection<K> keys)
Description copied from interface:StorageRemoves all the given keys.
-
-