Show / Hide Table of Contents

Class InMemoryClusterConfigurationStorage<TAddress>

Represents in-memory storage of cluster configuration.

Inheritance
object
Disposable
ClusterConfigurationStorage<TAddress>
InMemoryClusterConfigurationStorage<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 InMemoryClusterConfigurationStorage<TAddress> : ClusterConfigurationStorage<TAddress>, IClusterConfigurationStorage<TAddress>, IClusterConfigurationStorage, IDisposable where TAddress : notnull
Type Parameters
Name Description
TAddress

The type of cluster member address.

Constructors

View Source

InMemoryClusterConfigurationStorage()

Initializes a new in-memory configuration storage.

Declaration
protected InMemoryClusterConfigurationStorage()

Methods

View Source

CreateInitialConfigurationBuilder()

Creates a builder of the initial configuration.

Declaration
public InMemoryClusterConfigurationStorage<TAddress>.Builder CreateInitialConfigurationBuilder()
Returns
Type Description
InMemoryClusterConfigurationStorage<TAddress>.Builder

The builder instance.

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