Struct ElectionTimeout
Represents leader election timeout.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public struct ElectionTimeout
Constructors
| Improve this Doc View SourceElectionTimeout(Int32, Int32)
Initializes a new leader election timeout.
Declaration
public ElectionTimeout(int lowerValue, int upperValue)
Parameters
Type | Name | Description |
---|---|---|
Int32 | lowerValue | The lower possible value of leader election timeout, in milliseconds. |
Int32 | upperValue | The upper possible value of leader election timeout, in milliseconds. |
Properties
| Improve this Doc View SourceLowerValue
Gets lower possible value of leader election timeout, in milliseconds.
Declaration
public int LowerValue { get; }
Property Value
Type | Description |
---|---|
Int32 |
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 int UpperValue { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceModify(Int32, Int32)
Updates boundaries of the timeout.
Declaration
[Obsolete("Use ElectionTimeoutExtensions.Update method instead", true)]
public ElectionTimeout Modify(int lowerValue, int upperValue)
Parameters
Type | Name | Description |
---|---|---|
Int32 | lowerValue | The lower possible value of leader election timeout, in milliseconds. |
Int32 | upperValue | The upper possible value of leader election timeout, in milliseconds. |
Returns
Type | Description |
---|---|
ElectionTimeout | The modified leader election timeout. |
RandomTimeout()
Generates random election timeout.
Declaration
public int RandomTimeout()
Returns
Type | Description |
---|---|
Int32 | The randomized election timeout. |