Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SavedStateEvent

UpdateEvent sub-type emitted for updates of type "savedState".

Hierarchy

  • SavedStateEvent

Index

Properties

caller: unknown

The caller who triggered this update.

Specifically, this is:

  • For a local message, undefined.
  • For a remote message, the caller passed to receive.
  • For a loaded state, the caller passed to load.
  • For a remote message delivered as part of a loaded state (due to unmet causal dependencies), the caller passed to load.
isLocalOp: false

Whether the update is from a local transaction, i.e., it results from calling Collab methods on this replica.

redundant: Map<string, number>

For each replicaID in vectorClock's keys, the number of transactions from that sender that were redundant (i.e., we had already applied them), possibly 0.

The effect of this saved state on our state was to apply precisely the transactions with ID (senderID, senderCounter) where:

  • vectorClock.has(senderID)
  • redundant.get(senderID) < senderCounter <= vectorClock.get(senderID).
update: Uint8Array

The serialized update.

Specifically, this is:

  • For a local message, its SendEvent.message.
  • For a remote message, the message passed to receive.
  • For a loaded state, the savedState passed to load.
updateType: "savedState"

The update's type.

vectorClock: Map<string, number>

The vector clock for this saved state, mapping each replicaID to the number of included transactions from that replicaID.

This saved state includes precisely the transactions with ID (senderID, senderCounter) where senderCounter <= (vectorClock.get(senderID) ?? 0).

Generated using TypeDoc