Search Results for

    Show / Hide Table of Contents

    Class BackoffAlgorithm

    The base class for backoff algorithms.

    Inheritance
    System.Object
    BackoffAlgorithm
    BackoffAlgorithmErr1040
    BackoffAlgorithmErr1205
    BackoffAlgorithmErr1213
    BackoffAlgorithmErr1614
    BackoffAlgorithmErr2006
    BackoffAlgorithmErr2013
    BackoffAlgorithmNdb
    Namespace: MySql.Data.EntityFramework
    Assembly: MySql.Data.EntityFramework.dll
    Version: 9.3.0
    Syntax
    public abstract class BackoffAlgorithm
    Remarks

    Different transient error conditions require different approaches.

    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()
    In This Article
    • Constructors
      • BackoffAlgorithm()
      • BackoffAlgorithm(Int32, TimeSpan)
    • Fields
      • _maxDelay
      • _maxRetries
      • _totalRetries
      • DEFAULT_MAX_DELAY
      • DEFAULT_MAX_RETRIES
    • Methods
      • GetNextDelay()
      • Reset()
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.