Struct ElectionTimeout
Represents leader election timeout.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public readonly struct ElectionTimeout
Properties
| Edit this page View SourceLowerValue
Gets lower possible value of leader election timeout, in milliseconds.
Declaration
public required int LowerValue { get; init; }
Property Value
Type | Description |
---|---|
int |
Recommended
Gets recommended election timeout.
Declaration
public static ElectionTimeout Recommended { get; }
Property Value
Type | Description |
---|---|
ElectionTimeout |
UpperValue
Gets upper possible value of leader election timeout, in milliseconds.
Declaration
public required int UpperValue { get; init; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceRandomTimeout(Random)
Generates random election timeout.
Declaration
public int RandomTimeout(Random random)
Parameters
Type | Name | Description |
---|---|---|
Random | random | The source of random values. |
Returns
Type | Description |
---|---|
int | The randomized election timeout. |