L W W Register
A delta-based CRDT Last Writer Wins (LWW) register.
Only the last written value is retained: the previous value (if any) is discarded.
When merging, only the value associated with the greatest timestamp is retained. A deletion is represented as a null value and handled the same way.
Its JSON serialization respects the following schema:
{
"type": "LWWRegister",
"metadata": Timestamp.toJson(),
"value": $value
}
Constructors
LWWRegister
Link copied to clipboard
fun LWWRegister()
Content copied to clipboard
Constructs an empty LWWRegister instance.
LWWRegister
Link copied to clipboard
LWWRegister
Link copied to clipboard
Constructs a LWWRegister instance initialized with a given value and environment.
LWWRegister
Link copied to clipboard
Copy constructor, discarding associated environment