Show / Hide Table of Contents

Class PersistentClusterConfigurationStorage<TAddress>

Represents persistent cluster configuration storage.

Inheritance
object
Disposable
ClusterConfigurationStorage<TAddress>
PersistentClusterConfigurationStorage<TAddress>
Implements
IClusterConfigurationStorage<TAddress>
IClusterConfigurationStorage
IDisposable
Inherited Members
ClusterConfigurationStorage<TAddress>.Encode(TAddress, ref BufferWriterSlim<byte>)
ClusterConfigurationStorage<TAddress>.Decode(ref SequenceReader)
ClusterConfigurationStorage<TAddress>.Dispose(bool)
ClusterConfigurationStorage<TAddress>.Comparer
ClusterConfigurationStorage<TAddress>.MemoryAllocator
ClusterConfigurationStorage<TAddress>.ConfigurationChanged
Disposable.CreateException()
Disposable.GetDisposedTask<T>()
Disposable.TrySetDisposedException<T>(TaskCompletionSource<T>)
Disposable.TrySetDisposedException(TaskCompletionSource)
Disposable.DisposeAsyncCore()
Disposable.DisposeAsync()
Disposable.TryBeginDispose()
Disposable.Dispose()
Disposable.Dispose(IEnumerable<IDisposable>)
Disposable.DisposeAsync(params IEnumerable<IAsyncDisposable>)
Disposable.Dispose<TDisposable>(params ReadOnlySpan<TDisposable>)
Disposable.IsDisposed
Disposable.IsDisposing
Disposable.IsDisposingOrDisposed
Disposable.DisposedTask
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Net.Cluster.Consensus.Raft.Membership
Assembly: DotNext.Net.Cluster.dll
Syntax
public abstract class PersistentClusterConfigurationStorage<TAddress> : ClusterConfigurationStorage<TAddress>, IClusterConfigurationStorage<TAddress>, IClusterConfigurationStorage, IDisposable where TAddress : notnull
Type Parameters
Name Description
TAddress

The type of the cluster member address.

Constructors

View Source

PersistentClusterConfigurationStorage(string)

Initializes a new persistent storage.

Declaration
protected PersistentClusterConfigurationStorage(string fileName)
Parameters
Type Name Description
string fileName

The full path to the file used as persistent storage of cluster members.

Methods

View Source

LoadConfigurationAsync(CancellationToken)

Loads the configuration from the storage.

Declaration
protected override sealed ValueTask<(MemoryOwner<byte> Configuration, long Version)> LoadConfigurationAsync(CancellationToken token)
Parameters
Type Name Description
CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
ValueTask<(MemoryOwner<byte> Configuration, long Version)>

The memory block representing the cluster configuration.

Overrides
ClusterConfigurationStorage<TAddress>.LoadConfigurationAsync(CancellationToken)
View Source

SaveConfigurationAsync(ReadOnlyMemory<byte>, long, CancellationToken)

Stores the configuration.

Declaration
protected override sealed ValueTask<bool> SaveConfigurationAsync(ReadOnlyMemory<byte> configuration, long configurationVersion, CancellationToken token)
Parameters
Type Name Description
ReadOnlyMemory<byte> configuration

The memory block representing the cluster configuration.

long configurationVersion

The version of the configuration.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
ValueTask<bool>

The task representing asynchronous result.

Overrides
ClusterConfigurationStorage<TAddress>.SaveConfigurationAsync(ReadOnlyMemory<byte>, long, CancellationToken)

Implements

IClusterConfigurationStorage<TAddress>
IClusterConfigurationStorage
IDisposable

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
☀
☾