public final class ORMultiMap<A> extends java.lang.Object implements ReplicatedData, ReplicatedDataSerialization, RemovedNodePruning
ORMap
with an ORSet
for the map's value.
This class is immutable, i.e. "modifying" methods return a new instance.
Constructor and Description |
---|
ORMultiMap(ORMap<ORSet<A>> underlying) |
Modifier and Type | Method and Description |
---|---|
static ORMultiMap<java.lang.Object> |
_empty() |
ORMultiMap<A> |
addBinding(Cluster node,
java.lang.String key,
A element)
Java API: Add an element to a set associated with a key.
|
ORMultiMap<A> |
addBinding(java.lang.String key,
A element,
Cluster node)
Scala API: Add an element to a set associated with a key.
|
ORMultiMap<A> |
addBinding(UniqueAddress node,
java.lang.String key,
A element)
INTERNAL API
|
static ORMultiMap<java.lang.Object> |
apply() |
boolean |
contains(java.lang.String key) |
static <A> ORMultiMap<A> |
create()
Java API
|
static <A> ORMultiMap<A> |
empty()
Provides an empty multimap.
|
scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<A>> |
entries()
Scala API: All entries of a multimap where keys are strings and values are sets.
|
boolean |
equals(java.lang.Object o) |
scala.Option<scala.collection.immutable.Set<A>> |
get(java.lang.String key)
Get the set associated with the key if there is one.
|
java.util.Map<java.lang.String,java.util.Set<A>> |
getEntries()
Java API: All entries of a multimap where keys are strings and values are sets.
|
scala.collection.immutable.Set<A> |
getOrElse(java.lang.String key,
scala.Function0<scala.collection.immutable.Set<A>> default_)
Scala API: Get the set associated with the key if there is one,
else return the given default.
|
int |
hashCode() |
boolean |
isEmpty() |
ORMultiMap<A> |
merge(ORMultiMap<A> that) |
boolean |
needPruningFrom(UniqueAddress removedNode)
Does it have any state changes from a specific node,
which has been removed from the cluster.
|
ORMultiMap<A> |
prune(UniqueAddress removedNode,
UniqueAddress collapseInto)
When the
removed node has been removed from the cluster the state
changes from that node will be pruned by collapsing the data entries
to another node. |
ORMultiMap<A> |
pruningCleanup(UniqueAddress removedNode)
Remove data entries from a node that has been removed from the cluster
and already been pruned.
|
ORMultiMap<A> |
put(Cluster node,
java.lang.String key,
scala.collection.immutable.Set<A> value)
Scala API: Associate an entire set with the key while retaining the history of the previous
replicated data set.
|
ORMultiMap<A> |
put(Cluster node,
java.lang.String key,
java.util.Set<A> value)
Java API: Associate an entire set with the key while retaining the history of the previous
replicated data set.
|
ORMultiMap<A> |
put(UniqueAddress node,
java.lang.String key,
scala.collection.immutable.Set<A> value)
INTERNAL API
|
ORMultiMap<A> |
remove(Cluster node,
java.lang.String key)
Remove an entire set associated with the key.
|
ORMultiMap<A> |
remove(UniqueAddress node,
java.lang.String key)
INTERNAL API
|
ORMultiMap<A> |
removeBinding(Cluster node,
java.lang.String key,
A element)
Java API: Remove an element of a set associated with a key.
|
ORMultiMap<A> |
removeBinding(java.lang.String key,
A element,
Cluster node)
Scala API: Remove an element of a set associated with a key.
|
ORMultiMap<A> |
removeBinding(UniqueAddress node,
java.lang.String key,
A element)
INTERNAL API
|
ORMultiMap<A> |
replaceBinding(java.lang.String key,
A oldElement,
A newElement,
Cluster node)
Replace an element of a set associated with a key with a new one if it is different.
|
ORMultiMap<A> |
replaceBinding(UniqueAddress node,
java.lang.String key,
A oldElement,
A newElement)
INTERNAL API
|
int |
size() |
java.lang.String |
toString() |
static scala.Option<scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<java.lang.Object>>> |
unapply(java.lang.Object value)
Extract the
entries() of an ORMultiMap . |
static <A> scala.Option<scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<A>>> |
unapply(ORMultiMap<A> m)
Extract the
entries() . |
ORMap<ORSet<A>> |
underlying() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
merge
public static ORMultiMap<java.lang.Object> _empty()
public static <A> ORMultiMap<A> empty()
public static ORMultiMap<java.lang.Object> apply()
public static <A> ORMultiMap<A> create()
public static <A> scala.Option<scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<A>>> unapply(ORMultiMap<A> m)
entries()
.m
- (undocumented)public static scala.Option<scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<java.lang.Object>>> unapply(java.lang.Object value)
entries()
of an ORMultiMap
.value
- (undocumented)public ORMultiMap<A> merge(ORMultiMap<A> that)
public scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<A>> entries()
public java.util.Map<java.lang.String,java.util.Set<A>> getEntries()
public scala.Option<scala.collection.immutable.Set<A>> get(java.lang.String key)
key
- (undocumented)public scala.collection.immutable.Set<A> getOrElse(java.lang.String key, scala.Function0<scala.collection.immutable.Set<A>> default_)
key
- (undocumented)default_
- (undocumented)public boolean contains(java.lang.String key)
public boolean isEmpty()
public int size()
public ORMultiMap<A> put(Cluster node, java.lang.String key, scala.collection.immutable.Set<A> value)
node
- (undocumented)key
- (undocumented)value
- (undocumented)public ORMultiMap<A> put(Cluster node, java.lang.String key, java.util.Set<A> value)
node
- (undocumented)key
- (undocumented)value
- (undocumented)public ORMultiMap<A> put(UniqueAddress node, java.lang.String key, scala.collection.immutable.Set<A> value)
node
- (undocumented)key
- (undocumented)value
- (undocumented)public ORMultiMap<A> remove(Cluster node, java.lang.String key)
node
- (undocumented)key
- (undocumented)public ORMultiMap<A> remove(UniqueAddress node, java.lang.String key)
node
- (undocumented)key
- (undocumented)public ORMultiMap<A> addBinding(java.lang.String key, A element, Cluster node)
key
- (undocumented)element
- (undocumented)node
- (undocumented)public ORMultiMap<A> addBinding(Cluster node, java.lang.String key, A element)
node
- (undocumented)key
- (undocumented)element
- (undocumented)public ORMultiMap<A> addBinding(UniqueAddress node, java.lang.String key, A element)
node
- (undocumented)key
- (undocumented)element
- (undocumented)public ORMultiMap<A> removeBinding(java.lang.String key, A element, Cluster node)
key
- (undocumented)element
- (undocumented)node
- (undocumented)public ORMultiMap<A> removeBinding(Cluster node, java.lang.String key, A element)
node
- (undocumented)key
- (undocumented)element
- (undocumented)public ORMultiMap<A> removeBinding(UniqueAddress node, java.lang.String key, A element)
node
- (undocumented)key
- (undocumented)element
- (undocumented)public ORMultiMap<A> replaceBinding(java.lang.String key, A oldElement, A newElement, Cluster node)
key
- (undocumented)oldElement
- (undocumented)newElement
- (undocumented)node
- (undocumented)public ORMultiMap<A> replaceBinding(UniqueAddress node, java.lang.String key, A oldElement, A newElement)
node
- (undocumented)key
- (undocumented)oldElement
- (undocumented)newElement
- (undocumented)public boolean needPruningFrom(UniqueAddress removedNode)
RemovedNodePruning
needPruningFrom
in interface RemovedNodePruning
removedNode
- (undocumented)public ORMultiMap<A> pruningCleanup(UniqueAddress removedNode)
RemovedNodePruning
pruningCleanup
in interface RemovedNodePruning
removedNode
- (undocumented)public ORMultiMap<A> prune(UniqueAddress removedNode, UniqueAddress collapseInto)
RemovedNodePruning
removed
node has been removed from the cluster the state
changes from that node will be pruned by collapsing the data entries
to another node.prune
in interface RemovedNodePruning
removedNode
- (undocumented)collapseInto
- (undocumented)public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object