Interface IClusterConfiguration<TAddress>
Represents a snapshot of cluster configuration.
Inherited Members
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 SourceMembers
Gets a collection of members in the cluster configuration.
Declaration
IReadOnlySet<TAddress> Members { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlySet<TAddress> |
Methods
View SourceAdd(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. |
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. |
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 |