Interface ICluster
Represents cluster node in distributed environment.
Namespace: DotNext.Net.Cluster
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface ICluster
Properties
| Improve this Doc View SourceLeader
Gets the leader node.
Declaration
IClusterMember Leader { get; }
Property Value
Type | Description |
---|---|
IClusterMember |
Members
Gets collection of cluster members.
Declaration
IReadOnlyCollection<IClusterMember> Members { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IClusterMember> |
Methods
| Improve this Doc View SourceResignAsync(CancellationToken)
Revokes leadership and starts new election process.
Declaration
Task<bool> ResignAsync(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token |
Returns
Type | Description |
---|---|
Task<Boolean> | true if leadership is revoked successfully; otherwise, false. |
Events
| Improve this Doc View SourceLeaderChanged
An event raised when leader has been changed.
Declaration
event ClusterLeaderChangedEventHandler LeaderChanged
Event Type
Type | Description |
---|---|
ClusterLeaderChangedEventHandler |