VersionVector class final

Per-actor high-water mark of observed HLCs (ADR 0011 §2).

Because an actor's HLCs are strictly monotonic, "have I seen this op?" reduces to op.hlc <= vv[actor] — no per-op id sets needed for dedupe.

Annotations
  • @immutable

Constructors

VersionVector([Map<String, Hlc>? entries])
VersionVector.fromJson(Map<String, dynamic> json)
factory

Properties

actors → Iterable<String>
All actors with at least one observed event.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(Hlc hlc) → bool
True when an event with hlc has already been observed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observed(Hlc hlc) → VersionVector
Returns a new vector that also has observed hlc.
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](String actorId) → Hlc?

Static Properties

zero → VersionVector
final