Interface IClusterConfigurationStorage<TAddress>
Provides a storage of cluster members.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft.Membership
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IClusterConfigurationStorage<TAddress> : IClusterConfigurationStorage, IDisposable where TAddress : notnull
Type Parameters
Name | Description |
---|---|
TAddress | The type of the cluster member address. |
Properties
| Edit this page View SourceActiveConfiguration
Represents active cluster configuration maintained by the node.
Declaration
IReadOnlySet<TAddress> ActiveConfiguration { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<TAddress> |
ProposedConfiguration
Represents proposed cluster configuration.
Declaration
IReadOnlySet<TAddress>? ProposedConfiguration { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<TAddress> |
Methods
| Edit this page View SourceAddMemberAsync(TAddress, CancellationToken)
Proposes a new member.
Declaration
ValueTask<bool> AddMemberAsync(TAddress address, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
TAddress | address | The address of the cluster member. |
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask<bool> | true if the new member is added to the proposed configuration; false if the storage has the proposed configuration already. |
RemoveMemberAsync(TAddress, CancellationToken)
Proposes removal of the existing member.
Declaration
ValueTask<bool> RemoveMemberAsync(TAddress address, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
TAddress | address | The address of the cluster member. |
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask<bool> | true if the new member is added to the proposed configuration; false if the storage has the proposed configuration already. |
Events
| Edit this page View SourceActiveConfigurationChanged
An event occurred when proposed configuration is applied.
Declaration
event Func<TAddress, bool, CancellationToken, ValueTask> ActiveConfigurationChanged
Event Type
Type | Description |
---|---|
Func<TAddress, bool, CancellationToken, ValueTask> |