Interface INodeRegistry
Manages cluster node registration and heartbeat.
Each tsak instance registers itself and periodically updates its heartbeat.
public interface INodeRegistry
Methods
DeregisterAsync(CancellationToken)
Deregisters the current node (graceful shutdown).
Task DeregisterAsync(CancellationToken ct = default)
GetAliveNodesAsync(CancellationToken)
Returns all nodes that are currently alive (heartbeat within threshold).
Task<IReadOnlyList<RedbObject<TsakNodeProps>>> GetAliveNodesAsync(CancellationToken ct = default)
GetAllNodesAsync(CancellationToken)
Returns all registered nodes regardless of status.
Task<IReadOnlyList<RedbObject<TsakNodeProps>>> GetAllNodesAsync(CancellationToken ct = default)
HeartbeatAsync(CancellationToken)
Updates the heartbeat timestamp for the current node.
Task HeartbeatAsync(CancellationToken ct = default)
MarkDeadNodesAsync(CancellationToken)
Marks nodes as dead if their heartbeat exceeds the timeout threshold.
Task<int> MarkDeadNodesAsync(CancellationToken ct = default)
RegisterAsync(CancellationToken)
Registers the current node in the cluster.
Task RegisterAsync(CancellationToken ct = default)
RemoveNodeAsync(string, CancellationToken)
Physically removes a dead/offline node record from the registry.
Task<bool> RemoveNodeAsync(string nodeId, CancellationToken ct = default)
SetCordonedAsync(string, bool, CancellationToken)
Sets the cordoned flag on a node (planned maintenance). A cordoned node keeps its current work
Task<bool> SetCordonedAsync(string nodeId, bool cordoned, CancellationToken ct = default)