ORMap

Implements a 'Observed Remove Map' CRDT, also called a 'OR-Map'.

It has similar semantics as an ORSet, but in case of concurrent updates the values are merged, and must therefore be ReplicatedData types themselves.

This class is immutable, i.e. "modifying" methods return a new instance.

Companion:
object
Source:
ORMap.scala
trait Serializable
class Object
trait Matchable
class Any

Type members

Types

type D = DeltaOp
type T = ORMap[A, B]

Value members

Concrete methods

def :+(entry: (A, B))(implicit node: SelfUniqueAddress): ORMap[A, B]

Adds an entry to the map

Adds an entry to the map

See also:

ORMap#put

Source:
ORMap.scala
def contains(key: A): Boolean
def entries: Map[A, B]

Scala API: All entries of the map.

Scala API: All entries of the map.

Source:
ORMap.scala
override def equals(o: Any): Boolean
Definition Classes
Any
Source:
ORMap.scala
def get(key: A): Option[B]
def getEntries(): Map[A, B]

Java API: All entries of the map.

Java API: All entries of the map.

Source:
ORMap.scala
def getOrElse(key: A, default: => B): B

Scala API: Get the value associated with the key if there is one, else return the given default.

Scala API: Get the value associated with the key if there is one, else return the given default.

Source:
ORMap.scala
override def hashCode: Int
Definition Classes
Any
Source:
ORMap.scala
override def merge(that: ORMap[A, B]): ORMap[A, B]
Definition Classes
Source:
ORMap.scala
override def mergeDelta(thatDelta: DeltaOp): ORMap[A, B]
Definition Classes
Source:
ORMap.scala
Definition Classes
Source:
ORMap.scala
override def needPruningFrom(removedNode: UniqueAddress): Boolean
Definition Classes
Source:
ORMap.scala
override def prune(removedNode: UniqueAddress, collapseInto: UniqueAddress): ORMap[A, B]
Definition Classes
Source:
ORMap.scala
override def pruningCleanup(removedNode: UniqueAddress): ORMap[A, B]
Definition Classes
Source:
ORMap.scala
def put(node: SelfUniqueAddress, key: A, value: B): ORMap[A, B]

Adds an entry to the map. Note that the new value will be merged with existing values on other nodes and the outcome depends on what ReplicatedData type that is used.

Adds an entry to the map. Note that the new value will be merged with existing values on other nodes and the outcome depends on what ReplicatedData type that is used.

Consider using ORMap#updated instead of put if you want modify existing entry.

IllegalArgumentException is thrown if you try to replace an existing ORSet value, because important history can be lost when replacing the ORSet and undesired effects of merging will occur. Use ORMultiMap or ORMap#updated instead.

Source:
ORMap.scala
def remove(key: A)(implicit node: SelfUniqueAddress): ORMap[A, B]

Scala API Removes an entry from the map. Note that if there is a conflicting update on another node the entry will not be removed after merge.

Scala API Removes an entry from the map. Note that if there is a conflicting update on another node the entry will not be removed after merge.

Source:
ORMap.scala
def remove(node: SelfUniqueAddress, key: A): ORMap[A, B]

Java API Removes an entry from the map. Note that if there is a conflicting update on another node the entry will not be removed after merge.

Java API Removes an entry from the map. Note that if there is a conflicting update on another node the entry will not be removed after merge.

Source:
ORMap.scala
override def resetDelta: ORMap[A, B]
Definition Classes
Source:
ORMap.scala
def size: Int
override def toString: String
Definition Classes
Any
Source:
ORMap.scala
def update(node: SelfUniqueAddress, key: A, initial: B, modify: Function[B, B]): ORMap[A, B]

Java API: Replace a value by applying the modify function on the existing value.

Java API: Replace a value by applying the modify function on the existing value.

If there is no current value for the key the initial value will be passed to the modify function.

Source:
ORMap.scala
def updated(node: SelfUniqueAddress, key: A, initial: B)(modify: B => B): ORMap[A, B]

Scala API: Replace a value by applying the modify function on the existing value.

Scala API: Replace a value by applying the modify function on the existing value.

If there is no current value for the key the initial value will be passed to the modify function.

Source:
ORMap.scala

Deprecated methods

@deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "2.5.20")
def +(entry: (A, B))(implicit node: Cluster): ORMap[A, B]
Deprecated
[Since version 2.5.20]
Source:
ORMap.scala
@deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "2.5.20")
def -(key: A)(implicit node: Cluster): ORMap[A, B]
Deprecated
[Since version 2.5.20]
Source:
ORMap.scala
@deprecated("Use `put` that takes a `SelfUniqueAddress` parameter instead.", since = "2.5.20")
def put(node: Cluster, key: A, value: B): ORMap[A, B]
Deprecated
[Since version 2.5.20]
Source:
ORMap.scala
@deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "2.5.20")
def remove(node: Cluster, key: A): ORMap[A, B]
Deprecated
[Since version 2.5.20]
Source:
ORMap.scala
@/ @deprecated("Use `update` that takes a `SelfUniqueAddress` parameter instead.", since = "2.5.20")
def update(node: Cluster, key: A, initial: B, modify: Function[B, B]): ORMap[A, B]
Deprecated
[Since version 2.5.20]
Source:
ORMap.scala
@deprecated("Use `updated` that takes a `SelfUniqueAddress` parameter instead.", since = "2.5.20")
def updated(node: Cluster, key: A, initial: B)(modify: B => B): ORMap[A, B]
Deprecated
[Since version 2.5.20]
Source:
ORMap.scala
@/ @deprecated("use update for the Java API as updated is ambiguous with the Scala API", "2.5.20")
def updated(node: Cluster, key: A, initial: B, modify: Function[B, B]): ORMap[A, B]

Java API: Replace a value by applying the modify function on the existing value.

Java API: Replace a value by applying the modify function on the existing value.

If there is no current value for the key the initial value will be passed to the modify function.

Deprecated
Source:
ORMap.scala

Concrete fields

override val delta: Option[DeltaOp]