Class ClusterCoordinator

Assembly: redb.Tsak.Core.Pro.dll

Main cluster coordination service.
Runs a background loop: heartbeat → leader election → (if leader) dead-node detection + rebalance.
Non-leader nodes poll their assignments and start/stop modules accordingly.

public sealed class ClusterCoordinator : IClusterCoordinator

Inheritance

Object→ClusterCoordinator

Implements

Properties

CurrentEpoch

Current leader epoch (for fencing stale operations).

public long CurrentEpoch { get; }

IsLeader

Whether this node is currently the cluster leader.

public bool IsLeader { get; }

NodeId

Unique identifier of this node.

public string NodeId { get; }

Methods

RebalanceAsync(CancellationToken)

Triggers an immediate rebalance (used by API or topology changes).

public Task RebalanceAsync(CancellationToken ct = default)

StartAsync(CancellationToken)

Starts the cluster coordination loop.

public Task StartAsync(CancellationToken ct = default)

StopAsync(CancellationToken)

Stops the cluster coordination loop and deregisters the node.

public Task StopAsync(CancellationToken ct = default)

Constructors