Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CRDTMessageMeta

CRDT-related meta for a message.

CRuntime puts this meta in MessageMeta.runtimeExtra whenever it delivers a message to Collab.receive. To access it more easily, consider extending PrimitiveCRDT.

All messages in the same transaction have the same CRDTMessageMeta.

Properties are only included if they were accessed during the sender's own local echo (i.e., within their PrimitiveCRDT.receiveCRDT / Collab.receive call) or requested by a CRDTMetaRequest passed to PrimitiveCRDT.sendCRDT / Collab.send. Other fields are null, or 0 for [[vectorClockGet]].

Hierarchy

  • CRDTMessageMeta

Index

Properties

lamportTimestamp: null | number

The Lamport timestamp for the transaction that created this item. When present, it is always positive.

If not requested or accessed by the sender, this is null.

senderCounter: number

The sender's own vector clock entry for this transaction.

I.e., this transaction's index (1-indexed) among all transactions sent by [[sender]].

senderID: string

Copy of MessageMeta.senderID, for convenience.

vectorClock: VectorClock

The message's vector clock.

In the vector clock, entries that were not accessed or requested by the sender return 0, regardless of the actual value.

wallClockTime: null | number

The sender's wall clock time (Date.now()) for the transaction that created this item.

If not requested or accessed by the sender, this is null.

Generated using TypeDoc