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
Methods
View SourceLoadConfigurationAsync(CancellationToken)
Loads configuration from the storage.
Declaration
ValueTask<(IDataTransferObject Configuration, long Version)> LoadConfigurationAsync(CancellationToken token = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | token | The token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| ValueTask<(IDataTransferObject Configuration, long Version)> | The copy of the configuration. |
SaveConfigurationAsync<TConfiguration>(TConfiguration, long, CancellationToken)
Saves the configuration to the storage.
Declaration
ValueTask<bool> SaveConfigurationAsync<TConfiguration>(TConfiguration configuration, long configurationVersion, CancellationToken token = default) where TConfiguration : IDataTransferObject
Parameters
| Type | Name | Description |
|---|---|---|
| TConfiguration | configuration | The configuration to store. |
| long | configurationVersion | The configuration version. |
| CancellationToken | token | The token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| ValueTask<bool> | true if |
Type Parameters
| Name | Description |
|---|---|
| TConfiguration |