Show / Hide Table of Contents

Interface IClusterConfiguration<TAddress>

Represents a snapshot of cluster configuration.

Inherited Members
IDataTransferObject.WriteToAsync<TWriter>(TWriter, CancellationToken)
IDataTransferObject.TransformAsync<TResult, TTransformation>(Stream, TTransformation, bool, Memory<byte>, CancellationToken)
IDataTransferObject.TransformAsync<TResult, TTransformation>(Stream, TTransformation, bool, MemoryAllocator<byte>, CancellationToken)
IDataTransferObject.TransformAsync<TResult, TTransformation>(Stream, TTransformation, bool, CancellationToken)
IDataTransferObject.TransformAsync<TResult, TTransformation>(PipeReader, TTransformation, CancellationToken)
IDataTransferObject.TransformAsync<TResult, TTransformation>(TTransformation, CancellationToken)
IDataTransferObject.TryGetMemory(out ReadOnlyMemory<byte>)
IDataTransferObject.Empty
IDataTransferObject.IsReusable
IDataTransferObject.Length
Namespace: DotNext.Net.Cluster.Consensus.Raft.Membership
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IClusterConfiguration<TAddress> : IDataTransferObject where TAddress : notnull
Type Parameters
Name Description
TAddress

The type of the member address.

Properties

View Source

Members

Gets a collection of members in the cluster configuration.

Declaration
IReadOnlySet<TAddress> Members { get; }
Property Value
Type Description
IReadOnlySet<TAddress>

Methods

View Source

Add(TAddress)

Adds a new member.

Declaration
IClusterConfiguration<TAddress> Add(TAddress address)
Parameters
Type Name Description
TAddress address

The address of the member to add.

Returns
Type Description
IClusterConfiguration<TAddress>

A new version of the configuration.

View Source

Remove(TAddress)

Removes the configuration member.

Declaration
IClusterConfiguration<TAddress> Remove(TAddress address)
Parameters
Type Name Description
TAddress address

The address of the member to remove.

Returns
Type Description
IClusterConfiguration<TAddress>

A new version of the configuration.

View Source

TryRemove(ref IClusterConfiguration<TAddress>, TAddress)

Removes the address from the configuration.

Declaration
public static bool TryRemove(ref IClusterConfiguration<TAddress> configuration, TAddress address)
Parameters
Type Name Description
IClusterConfiguration<TAddress> configuration

The configuration to mutate.

TAddress address

The address to remove.

Returns
Type Description
bool

true if the address is removed successfully and configuration is mutated; otherwise, false.

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