Interface IClusterConfigurationStorage
Provides a storage of cluster members.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft.Membership
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IClusterConfigurationStorage : IDisposable
Properties
| Edit this page View SourceActiveConfiguration
Represents active cluster configuration maintained by the node.
Declaration
IClusterConfiguration ActiveConfiguration { get; }
Property Value
Type | Description |
---|---|
IClusterConfiguration |
ProposedConfiguration
Represents proposed cluster configuration.
Declaration
IClusterConfiguration? ProposedConfiguration { get; }
Property Value
Type | Description |
---|---|
IClusterConfiguration |
Methods
| Edit this page View SourceApplyAsync(CancellationToken)
Applies proposed configuration as active configuration.
Declaration
ValueTask ApplyAsync(CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask | The task representing asynchronous result. |
LoadConfigurationAsync(CancellationToken)
Loads configuration from the storage.
Declaration
ValueTask LoadConfigurationAsync(CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask | The task representing asynchronous result. |
ProposeAsync(IClusterConfiguration, CancellationToken)
Proposes the configuration.
Declaration
ValueTask ProposeAsync(IClusterConfiguration configuration, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
IClusterConfiguration | configuration | The proposed configuration. |
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask | The task representing asynchronous result. |
Remarks
If method is called multiple times then ProposedConfiguration will be rewritten.
WaitForApplyAsync(CancellationToken)
Waits until the proposed configuration becomes active.
Declaration
Task WaitForApplyAsync(CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
Task | The task representing asynchronous result. |