ChangeID

data class ChangeID(val clientSeq: UInt, val lamport: Long, val actor: ActorID, val versionVector: VersionVector, val serverSeq: Long = 0)

Identifies the Change.

Parameters

clientSeq

: is the sequence number of the client that created this change.

lamport

: lamport` is the lamport clock of this change. This is used to determine the order of changes in logical time. It is optional and only present if the change has operations.

actor

: is the creator of this change.

versionVector

: is the vector clock of this change. This is used to determine the relationship is causal or not between changes. It is optional and only present if the change has operations.

serverSeq

: is optional and only present for changes stored on the server.

Constructors

Link copied to clipboard
constructor(clientSeq: UInt, lamport: Long, actor: ActorID, versionVector: VersionVector, serverSeq: Long = 0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val serverSeq: Long = 0
Link copied to clipboard

Functions

Link copied to clipboard

Creates a ticket of the given delimiter.

Link copied to clipboard
fun next(excludeClocks: Boolean = false): ChangeID

Creates a next ID of this ID.

Link copied to clipboard
fun setActor(actorID: ActorID): ChangeID

Sets the given actorID.

Link copied to clipboard
fun setClocks(otherLamport: Long, vector: VersionVector): ChangeID

setClocks sets the given clocks to this ID. This is used when the snapshot is given from the server.

Link copied to clipboard
fun setLamport(lamport: Long): ChangeID

setLamport sets the given lamport clock.

Link copied to clipboard

Sets the vector vector.

Link copied to clipboard

syncClocks syncs logical clocks with the given ID.

Link copied to clipboard
fun syncLamport(otherLamport: Long): ChangeID

Syncs lamport timestamp with the given ID.