Class VersionVector

VersionVector is a vector clock that is used to detect the relationship between changes whether they are causally related or concurrent. It is similar to vector clocks, but it is synced with lamport timestamp of the change.

Constructors

Properties

vector: Map<string, bigint>

Methods

  • get gets the lamport timestamp of the given actor.

    Parameters

    • actorID: string

    Returns undefined | bigint

  • set sets the lamport timestamp of the given actor.

    Parameters

    • actorID: string
    • lamport: bigint

    Returns void

  • unset removes the version for the given actor from the VersionVector.

    Parameters

    • actorID: string

    Returns void