Show / Hide Table of Contents

Class ExponentBackoffStrategy

The exponential backoff strategy with an equal jitter.

Inheritance
System.Object
ExponentBackoffStrategy
Implements
IBackoffStrategy
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Amazon.QLDB.Driver
Assembly: Amazon.QLDB.Driver.dll
Syntax
public class ExponentBackoffStrategy : IBackoffStrategy

Constructors

| Improve this Doc View Source

ExponentBackoffStrategy()

Initializes a new instance of the ExponentBackoffStrategy class with default settings.

Declaration
public ExponentBackoffStrategy()
| Improve this Doc View Source

ExponentBackoffStrategy(Int32, Int32)

Initializes a new instance of the ExponentBackoffStrategy class.

Declaration
public ExponentBackoffStrategy(int sleepBaseMilliseconds, int sleepCapMilliseconds)
Parameters
Type Name Description
System.Int32 sleepBaseMilliseconds

The base of the exponent in milliseconds.

System.Int32 sleepCapMilliseconds

The cap of the delay in milliseconds.

Fields

| Improve this Doc View Source

DefaultSleepBaseMilliseconds

Declaration
public const int DefaultSleepBaseMilliseconds = 10
Field Value
Type Description
System.Int32
| Improve this Doc View Source

DefaultSleepCapMilliseconds

Declaration
public const int DefaultSleepCapMilliseconds = 5000
Field Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

CalculateDelay(RetryPolicyContext)

Calculate the delay based on the number of retries attempted. It has an equal jitter, which means the delay would be in the 90% to 100% range of the power.

Declaration
public TimeSpan CalculateDelay(RetryPolicyContext retryPolicyContext)
Parameters
Type Name Description
RetryPolicyContext retryPolicyContext

The context of retry policy.

Returns
Type Description
System.TimeSpan

The calculated delay.

Implements

IBackoffStrategy
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX