Class RaftCluster.NodeConfiguration
Represents transport-agnostic configuration of cluster member.
Inheritance
Implements
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public abstract class RaftCluster.NodeConfiguration : IClusterMemberConfiguration
Properties
| Edit this page View SourceAggressiveLeaderStickiness
Gets a value indicating that the follower node should not try to upgrade to the candidate state if the leader is reachable via the network.
Declaration
public bool AggressiveLeaderStickiness { get; set; }
Property Value
Type | Description |
---|---|
bool |
Announcer
Gets or sets the delegate that can be used to announce the node to the cluster if ColdStart is false.
Declaration
public ClusterMemberAnnouncer<EndPoint>? Announcer { get; set; }
Property Value
Type | Description |
---|---|
ClusterMemberAnnouncer<EndPoint> |
ColdStart
Gets or sets a value indicating that the initial node in the cluster is starting.
Declaration
public bool ColdStart { get; set; }
Property Value
Type | Description |
---|---|
bool |
ConfigurationStorage
Gets or sets the storage for cluster configuration.
Declaration
public IClusterConfigurationStorage<EndPoint>? ConfigurationStorage { get; set; }
Property Value
Type | Description |
---|---|
IClusterConfigurationStorage<EndPoint> |
Remarks
If not set then use in-memory storage by default.
HeartbeatThreshold
Gets or sets threshold of the heartbeat timeout.
Declaration
public double HeartbeatThreshold { get; set; }
Property Value
Type | Description |
---|---|
double |
Remarks
The threshold should be in range (0, 1). The heartbeat timeout is computed as node election timeout X threshold. The default is 0.5.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Attempts to set invalid value. |
HostEndPoint
Gets the address used for hosting local member.
Declaration
public abstract EndPoint HostEndPoint { get; }
Property Value
Type | Description |
---|---|
EndPoint |
LoggerFactory
Gets or sets logger factory using for internal logging.
Declaration
[CLSCompliant(false)]
public ILoggerFactory LoggerFactory { get; set; }
Property Value
Type | Description |
---|---|
ILoggerFactory |
LowerElectionTimeout
Gets lower possible value of leader election timeout, in milliseconds.
Declaration
public int LowerElectionTimeout { get; set; }
Property Value
Type | Description |
---|---|
int |
MemoryAllocator
Gets or sets memory allocator to be used for network I/O.
Declaration
public MemoryAllocator<byte> MemoryAllocator { get; set; }
Property Value
Type | Description |
---|---|
MemoryAllocator<byte> |
Metadata
Gets metadata associated with local cluster member.
Declaration
public IDictionary<string, string> Metadata { get; }
Property Value
Type | Description |
---|---|
IDictionary<string, string> |
PublicEndPoint
Gets the address of the local member visible to other members.
Declaration
public EndPoint PublicEndPoint { get; set; }
Property Value
Type | Description |
---|---|
EndPoint |
RequestTimeout
Gets or sets request processing timeout.
Declaration
public TimeSpan RequestTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Standby
Gets or sets a value indicating that the cluster member represents standby node which is never become a leader.
Declaration
public bool Standby { get; set; }
Property Value
Type | Description |
---|---|
bool |
UpperElectionTimeout
Gets upper possible value of leader election timeout, in milliseconds.
Declaration
public int UpperElectionTimeout { get; set; }
Property Value
Type | Description |
---|---|
int |
WarmupRounds
Gets or sets the numbers of rounds used to warmup a fresh node which wants to join the cluster.
Declaration
public int WarmupRounds { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceUseInMemoryConfigurationStorage()
Sets ConfigurationStorage to in-memory configuration storage.
Declaration
public InMemoryClusterConfigurationStorage<EndPoint> UseInMemoryConfigurationStorage()
Returns
Type | Description |
---|---|
InMemoryClusterConfigurationStorage<EndPoint> | The constructed storage. |
Remarks
This storage is not recommended for production use.