Readonly
peersA stub for other peers. Not used in the server clock.
Readonly
sidSession ID (or actor ID, site ID, process ID, etc.), a random identifier randomly assigned to each editing session.
Logical time (or sequence number, tick, etc.), a monotonically increasing integer, starting from 0. It does not produce gaps on local machine, but it can produce gaps when merged with other clocks.
Needs to be mutable in vector clock. Other than that, it should be treated as immutable.
Copy the clock while keeping the same session ID.
Copy the clock with a new session ID.
Advances clocks when we observe higher time values.
Operation timestamp that was observed.
Returns a new timestamp, which is the current clock value, and advances the clock by a number of cycles.
Number of cycles to advance the clock.
A new timestamp, which is the current clock value.
Implements a clock vector with a fixed session ID. The server clock is used when the CRDT is powered by a central server.