Dot class

A logical (Lamport-style) identifier for one element of a Fugue list.

Unlike an HLC, a dot carries no wall-clock component: counter is a pure per-replica logical clock. That is what lets a run of contiguously-typed characters share consecutive counters and collapse into a single block — the RGASplit / Yjs "waypoint" optimisation the optimised Fugue relies on. An HLC's millisecond field changes on almost every keystroke (~100 ms apart), which would reset the counter and split every character into its own block, defeating the optimisation.

The total order is (counter, replica). Fugue only requires some agreed total order over dots to tie-break same-side siblings (paper §4, "the exact construction of IDs and their order is not important"), so this choice is not semantically load-bearing beyond being consistent.

Implemented types

Constructors

Dot(int counter, String replica)
Creates a dot with logical counter and author replica.
const

Properties

counter int
Per-replica logical clock value. Strictly positive for real elements; 0 is reserved (see Dot.origin).
final
hashCode int
The hash code for this object.
no setteroverride
isOrigin bool
Whether this is the origin sentinel.
no setter
replica String
Stable identifier of the replica that minted this dot.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(Dot other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator <(Dot other) bool
Whether this dot orders before other.
operator <=(Dot other) bool
Whether this dot orders at or before other.
operator ==(Object other) bool
The equality operator.
override
operator >(Dot other) bool
Whether this dot orders after other.
operator >=(Dot other) bool
Whether this dot orders at or after other.

Constants

origin → const Dot
The virtual origin ("root") that every top-level element hangs off. Never stored as a real element; used only as a parent sentinel.