HLC class
A hybrid logical clock implementation with string-based nodes.
- Implemented types
Constructors
Properties
- count → int
-
The clock's event count, which breaks ties in the case of identical clocks.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- node → String
-
This node's name (or ID), which breaks ties in the case of identical counts.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → int
-
The clock's timestamp.
final
Methods
-
compareTo(
HLC other) → int -
Compares this object to another object.
override
-
copy(
{int? timestamp, int? count, String? node}) → HLC - Constructs a copy of this HLC with the given parameters.
-
increment(
) → HLC - Produces the next, local clock.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pack(
) → String - Encodes this HLC into a string representation whose topological ordering is equivalent to that of the original HLC.
-
receive(
HLC remote, {Duration? maximumDrift, int? now}) → HLC -
Synchronizes with a given
remote
clock. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
dynamic other) → bool -
The equality operator.
override