Show / Hide Table of Contents

Interface IClusterConfigurationStorage

Provides a storage of cluster members.

Inherited Members
IDisposable.Dispose()
Namespace: DotNext.Net.Cluster.Consensus.Raft.Membership
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IClusterConfigurationStorage : IDisposable

Methods

View Source

LoadConfigurationAsync(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.

View Source

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 configurationVersion is co

Type Parameters
Name Description
TConfiguration

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾