Interface IRaftHttpCluster
Represents local view of Raft cluster built on top of ASP.NET Core infrastructure.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft.Http
Assembly: DotNext.AspNetCore.Cluster.dll
Syntax
public interface IRaftHttpCluster : IMessageBus, IPeerMesh<ISubscriber>, IStandbyModeSupport, IUnresponsiveClusterMemberRemovalSupport, IRaftCluster, IReplicationCluster<IRaftLogEntry>, IReplicationCluster, ICluster, IPeerMesh<IClusterMember>, IPeerMesh<IRaftClusterMember>, IPeerMesh
Properties
| Edit this page View SourceLocalMemberAddress
Gets the address of the local member.
Declaration
Uri LocalMemberAddress { get; }
Property Value
| Type | Description |
|---|---|
| Uri |
Methods
| Edit this page View SourceAddMemberAsync(Uri, CancellationToken)
Announces a new member in the cluster.
Declaration
Task<bool> AddMemberAsync(Uri address, CancellationToken token = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | address | The address of the cluster member. |
| CancellationToken | token | The token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<bool> | true if the node has been added to the cluster successfully; false if the node rejects the replication or the address of the node cannot be committed. |
Exceptions
| Type | Condition |
|---|---|
| NotLeaderException | The current node is not a leader. |
| OperationCanceledException | The operation has been canceled or the cluster elects a new leader. |
RemoveMemberAsync(Uri, CancellationToken)
Removes the member from the cluster.
Declaration
Task<bool> RemoveMemberAsync(Uri address, CancellationToken token = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | address | The address of the cluster member. |
| CancellationToken | token | The token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<bool> | true if the node has been removed from the cluster successfully; false if the node rejects the replication or the address of the node cannot be committed. |
Exceptions
| Type | Condition |
|---|---|
| NotLeaderException | The current node is not a leader. |
| OperationCanceledException | The operation has been canceled or the cluster elects a new leader. |