CoordinationState class

Internal coordination state with clear phase management.

Emits ControllerEvents for state changes through a single event stream.

Constructors

CoordinationState()

Properties

canAcceptNodes → bool
no setter
connectedNodes → List<Node>
no setter
connectedParticipantNodes → List<Node>
no setter
coordinatorUId → String?
no setter
events → Stream<ControllerEvent>
Single event stream for all state-related events.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isCoordinator → bool
no setter
isEstablished → bool
no setter
phase → CoordinationPhase
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addNode(Node node) → void
becomeCoordinator(String coordinatorUId) → void
becomeParticipant([String? coordinatorUId]) → void
clearNodes() → void
Drops the whole topology, one NodeLeftEvent at a time.
dispose() → void
getStaleNodes(Duration timeout) → List<String>
isStale(String nodeUId, Duration timeout) → bool
Whether nodeUId has been silent for longer than timeout.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeNode(String nodeUId) → void
sinceLastHeard(String nodeUId) → Duration?
How long since anything was heard from nodeUId, or null if there is no record of ever hearing from it.
toString() → String
A string representation of this object.
inherited
transitionTo(CoordinationPhase newPhase) → void
updateNodeHeartbeat(String nodeUId) → void

Operators

operator ==(Object other) → bool
The equality operator.
inherited