Show / Hide Table of Contents

Struct ElectionTimeout

Represents leader election timeout.

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

Properties

View Source

LowerValue

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

Declaration
public required int LowerValue { get; init; }
Property Value
Type Description
int
View Source

Recommended

Gets recommended election timeout.

Declaration
public static ElectionTimeout Recommended { get; }
Property Value
Type Description
ElectionTimeout
View Source

UpperValue

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

Declaration
public required int UpperValue { get; init; }
Property Value
Type Description
int

Methods

View Source

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

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾