final class ORMultiMap[A] extends ReplicatedData with ReplicatedDataSerialization with RemovedNodePruning
An immutable multi-map implementation. This class wraps an ORMap with an ORSet for the map's value.
This class is immutable, i.e. "modifying" methods return a new instance.
- Annotations
- @SerialVersionUID()
- Source
- ORMultiMap.scala
- Alphabetic
- By Inheritance
- ORMultiMap
- RemovedNodePruning
- ReplicatedDataSerialization
- Serializable
- Serializable
- ReplicatedData
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Type Members
-
type
T = ORMultiMap[A]
The type of the concrete implementation, e.g.
The type of the concrete implementation, e.g.
GSet[A]
. To be specified by subclass.- Definition Classes
- ORMultiMap → ReplicatedData
Value Members
-
def
+(entry: (String, Set[A]))(implicit node: Cluster): ORMultiMap[A]
Convenience for put.
Convenience for put. Requires an implicit Cluster.
- See also
-
def
-(key: String)(implicit node: Cluster): ORMultiMap[A]
Convenience for remove.
Convenience for remove. Requires an implicit Cluster.
- See also
-
def
addBinding(node: Cluster, key: String, element: A): ORMultiMap[A]
Java API: Add an element to a set associated with a key.
Java API: Add an element to a set associated with a key. If there is no existing set then one will be initialised.
-
def
addBinding(key: String, element: A)(implicit node: Cluster): ORMultiMap[A]
Scala API: Add an element to a set associated with a key.
Scala API: Add an element to a set associated with a key. If there is no existing set then one will be initialised.
- def contains(key: String): Boolean
-
def
entries: Map[String, Set[A]]
Scala API: All entries of a multimap where keys are strings and values are sets.
-
def
equals(o: Any): Boolean
- Definition Classes
- ORMultiMap → AnyRef → Any
-
def
get(key: String): Option[Set[A]]
Get the set associated with the key if there is one.
-
def
getEntries(): Map[String, Set[A]]
Java API: All entries of a multimap where keys are strings and values are sets.
-
def
getOrElse(key: String, default: ⇒ Set[A]): Set[A]
Scala API: Get the set associated with the key if there is one, else return the given default.
-
def
hashCode(): Int
- Definition Classes
- ORMultiMap → AnyRef → Any
- def isEmpty: Boolean
-
def
merge(that: T): T
Monotonic merge function.
Monotonic merge function.
- Definition Classes
- ORMultiMap → ReplicatedData
-
def
needPruningFrom(removedNode: UniqueAddress): Boolean
Does it have any state changes from a specific node, which has been removed from the cluster.
Does it have any state changes from a specific node, which has been removed from the cluster.
- Definition Classes
- ORMultiMap → RemovedNodePruning
-
def
prune(removedNode: UniqueAddress, collapseInto: UniqueAddress): T
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.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.- Definition Classes
- ORMultiMap → RemovedNodePruning
-
def
pruningCleanup(removedNode: UniqueAddress): T
Remove data entries from a node that has been removed from the cluster and already been pruned.
Remove data entries from a node that has been removed from the cluster and already been pruned.
- Definition Classes
- ORMultiMap → RemovedNodePruning
-
def
put(node: Cluster, key: String, value: Set[A]): ORMultiMap[A]
Java API: Associate an entire set with the key while retaining the history of the previous replicated data set.
-
def
put(node: Cluster, key: String, value: Set[A]): ORMultiMap[A]
Scala API: Associate an entire set with the key while retaining the history of the previous replicated data set.
-
def
remove(node: Cluster, key: String): ORMultiMap[A]
Remove an entire set associated with the key.
-
def
removeBinding(node: Cluster, key: String, element: A): ORMultiMap[A]
Java API: Remove an element of a set associated with a key.
Java API: Remove an element of a set associated with a key. If there are no more elements in the set then the entire set will be removed.
-
def
removeBinding(key: String, element: A)(implicit node: Cluster): ORMultiMap[A]
Scala API: Remove an element of a set associated with a key.
Scala API: Remove an element of a set associated with a key. If there are no more elements in the set then the entire set will be removed.
-
def
replaceBinding(key: String, oldElement: A, newElement: A)(implicit node: Cluster): ORMultiMap[A]
Replace an element of a set associated with a key with a new one if it is different.
Replace an element of a set associated with a key with a new one if it is different. This is useful when an element is removed and another one is added within the same Update. The order of addition and removal is important in order to retain history for replicated data.
- def size: Int
-
def
toString(): String
- Definition Classes
- ORMultiMap → AnyRef → Any