NodeRegistry class
Tracks the nodes registered with the Hub and answers discovery queries.
Constructors
Properties
-
all
→ Iterable<
RegisteredNode> -
All registered nodes.
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
-
byId(
NodeId id) → RegisteredNode? -
The node with
id, ornull. -
byPeerId(
String peerId) → RegisteredNode? -
The node served by the peer connection
peerId, ornull. -
list(
{Map< String, String> filter = const {}}) → List<NodeDescriptor> -
Returns descriptors for discovery, applying an optional label
filter(eachkey=valuemust match the node's labels). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordHeartbeat(
{required NodeId id, required int seq, required int activeSessions, required DateTime now}) → void - Records an accepted heartbeat.
-
register(
{required NodeDescriptor descriptor, required HubPeer peer, required DateTime now}) → RegisteredNode - Registers (or re-registers) a node, replacing any prior record.
-
remove(
NodeId id) → RegisteredNode? -
Removes the node with
idfrom the registry, returning the removed record if present. -
toString(
) → String -
A string representation of this object.
inherited
-
updateCapabilities(
NodeId id, NodeCapabilities capabilities) → void -
Updates a node's advertised
capabilities.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited