Show / Hide Table of Contents

Struct ElectionTimeout

Represents leader election timeout.

Inherited Members
ValueType.Equals(Object)
ValueType.GetHashCode()
ValueType.ToString()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public struct ElectionTimeout

Constructors

| Improve this Doc View Source

ElectionTimeout(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 Source

LowerValue

Gets lower possible value of leader election timeout, in milliseconds.

Declaration
public int LowerValue { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Recommended

Gets recommended election timeout.

Declaration
public static ElectionTimeout Recommended { get; }
Property Value
Type Description
ElectionTimeout
| Improve this Doc View Source

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 Source

Modify(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.

| Improve this Doc View Source

RandomTimeout()

Generates random election timeout.

Declaration
public int RandomTimeout()
Returns
Type Description
Int32

The randomized election timeout.

Extension Methods

ElectionTimeoutExtensions.Update(ref ElectionTimeout, Nullable<Int32>, Nullable<Int32>)
Sequence.Skip<TEnumerator, T>(ref TEnumerator, Int32)
ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX