M V Map
A delta-based CRDT map implementing multi-value (MV) policy.
Each entry behaves like a MVRegister: values written concurrently are all kept until a write replaces them; accessors return the set of current values. A write (or delete) replaces every visible (local or merged) value.
On merging, for each key, a value is kept iff either:
it is in both replicas/deltas, or
it is in one replica and its associated timestamp is not in the causal context of the other replica.
Its JSON serialization respects the following schema:
{
"type": "MVMap",
"metadata": {
"entries": {
// $key is a string
(( "$key": [ ( Timestamp.toJson() )*( , Timestamp.toJson() )? ] )*( , "$key": [ ( Timestamp.toJson() )*( , Timestamp.toJson() )? ] ))?
},
"causalContext": VersionVector.toJson()
}
// $key is a string and $value can be a Boolean, Double, Int or String
( , "$key": [
(( T.toJson(), )*( T.toJson() ))?
] )*
}
Constructors
MVMap
Link copied to clipboard
MVMap
Link copied to clipboard
Constructor initializing the causal context.
Types
Functions
deleteBoolean
Link copied to clipboard
deleteDouble
Link copied to clipboard
deleteString
Link copied to clipboard
generateDelta
Link copied to clipboard
getBoolean
Link copied to clipboard
iteratorBoolean
Link copied to clipboard
iteratorDouble
Link copied to clipboard
iteratorInt
Link copied to clipboard
iteratorString
Link copied to clipboard
put
Link copied to clipboard