Class BackoffAlgorithm
The base class for backoff algorithms.
Inheritance
System.Object
BackoffAlgorithm
Assembly: MySql.Data.EntityFramework.dll
Version: 9.1.0
Syntax
public abstract class BackoffAlgorithm
Constructors
BackoffAlgorithm()
Declaration
public BackoffAlgorithm()
BackoffAlgorithm(Int32, TimeSpan)
Declaration
public BackoffAlgorithm(int maxRetries, TimeSpan maxDelay)
Parameters
Type |
Name |
Description |
System.Int32 |
maxRetries |
|
System.TimeSpan |
maxDelay |
|
Fields
_maxDelay
Declaration
protected TimeSpan _maxDelay
Field Value
Type |
Description |
System.TimeSpan |
|
_maxRetries
Declaration
protected int _maxRetries
Field Value
Type |
Description |
System.Int32 |
|
_totalRetries
Declaration
protected int _totalRetries
Field Value
Type |
Description |
System.Int32 |
|
DEFAULT_MAX_DELAY
Declaration
protected static readonly TimeSpan DEFAULT_MAX_DELAY
Field Value
Type |
Description |
System.TimeSpan |
|
DEFAULT_MAX_RETRIES
Declaration
protected const int DEFAULT_MAX_RETRIES = 3
Field Value
Type |
Description |
System.Int32 |
|
Methods
GetNextDelay()
The default implementation is an exponential delay backoff.
Declaration
public virtual TimeSpan? GetNextDelay()
Returns
Type |
Description |
System.Nullable<System.TimeSpan> |
|
Reset()
Resets a backoff algorithm, so they can be reused.
Declaration
public virtual void Reset()