The data-type specific relations r,r0 and r1 used for reducing the POLog size via causal redundancy
The data-type specific relations r,r0 and r1 used for reducing the POLog size via causal redundancy
Data-type specific eval over the full Seq of timestamped operations.
Data-type specific eval over the full Seq of timestamped operations. Note that the Seq contains both the non-stable operation from the POLog and the stable operations (timestamped with VectorTime.Zero) from the state.
the full sequence of ops, stable (with the VectorTime.Zero) and non-stable
the value of the crdt
Adds the operation to the POLog using the causal redundancy relations and also updates the state with the newly delivered operation.
Adds the operation to the POLog using the causal redundancy relations and also updates the state with the newly delivered operation.
newly delivered operation
operation's timestamp
operation's metadata
operation's metadata
a copy of the CRDT with its POLog and state updated
To simplify the eval method, it asociates the VectorTime.Zero to each stable operation and calls customEval over the full sequence of operations, the ones from the POLog and the ones from the state.
To simplify the eval method, it asociates the VectorTime.Zero to each stable operation and calls customEval over the full sequence of operations, the ones from the POLog and the ones from the state. Note: this has to be a sequence instead of a Set because now the VectorTime is not unique
Allows to define a custom implementation with improved performance to update the state.
Allows to define a custom implementation with improved performance to update the state. e.g. The AWCart implementation returns an empty state if the newly delivered operation is a ClearOp
the updated state
A pure-op based doesn't need to check preconditions because the framework just returns the unmodified operation on prepare
A pure-op based doesn't need to check preconditions because the framework just returns the unmodified operation on prepare
Update phase 1 ("atSource").
Update phase 1 ("atSource"). Prepares an operation for phase 2.
"This function takes a stable timestamp t (fed by the TCSB middleware) and the full PO-Log s as input, and returns a new PO-Log (i.e., a map), possibly discarding a set of operations at once."
"This function takes a stable timestamp t (fed by the TCSB middleware) and the full PO-Log s as input, and returns a new PO-Log (i.e., a map), possibly discarding a set of operations at once."
Adds the stable operations to the state of the CRDT
Adds the stable operations to the state of the CRDT
the current state of the CRDT
the causaly stable operations
the updated state
"The stable handler, on the other hand, invokes stabilize and then strips the timestamp (if the operation has not been discarded by stabilize), by replacing a (t', o') pair that is present in the returned PO-Log by (⊥, o')" The actual implementation doesn't replace the timestamp with ⊥, instead it calls stabilizeState with the current CRDT.state and the sequence of stable operations discarded from the POLog.
"The stable handler, on the other hand, invokes stabilize and then strips the timestamp (if the operation has not been discarded by stabilize), by replacing a (t', o') pair that is present in the returned PO-Log by (⊥, o')" The actual implementation doesn't replace the timestamp with ⊥, instead it calls stabilizeState with the current CRDT.state and the sequence of stable operations discarded from the POLog.
a crdt
a stable VectorTime fed by the middleware
a possible optimized crdt after discarding operations and removing timestamps
By default it uses CausalRedundancy.r0 (if the op was redundant and hence not added to the POLog) or CausalRedundancy.r1 (it the op was added to the POLog) to update the state, unless the ops contains an implementation of optimizedUpdateState
By default it uses CausalRedundancy.r0 (if the op was redundant and hence not added to the POLog) or CausalRedundancy.r1 (it the op was added to the POLog) to update the state, unless the ops contains an implementation of optimizedUpdateState
the newly delivered operation
a flag indicating if the newly delivered operation was redundant or it was added to the POLog.
the current CRDT state
the updated state
Returns the CRDT value (for example, the entries of an OR-Set)
Returns the CRDT value (for example, the entries of an OR-Set)
Default CRDT instance.
Default CRDT instance.
A base trait for pure-op based CRDTs wich state is a sequence of stable operations
CRDT value type