M V Register
A delta-based CRDT multi-value register.
Values written concurrently in different replicas of a MVRegister are all retained 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, 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": "MVRegister",
"metadata": VersionVector.toJson(),
"value": [
(( $value, )*( $value ))?
]
}
Constructors
MVRegister
Link copied to clipboard
fun MVRegister()
Content copied to clipboard
Default constructor creating an empty register.
MVRegister
Link copied to clipboard
MVRegister
Link copied to clipboard
Constructs a MVRegister instance initialized with a given value and environment.
MVRegister
Link copied to clipboard
Copy constructor, discarding associated environment
MVRegister
Link copied to clipboard
fun MVRegister(entries: Set<Pair<String, Timestamp>>, causalContext: VersionVector, env: Environment)
Content copied to clipboard