Search Results for

    Show / Hide Table of Contents

    Class RetryPolicyOptions

    Inheritance
    object
    RetryPolicyOptions
    Implements
    IOptionSet
    IConfigurationID
    IEquatable<RetryPolicyOptions>
    Namespace: LinqToDB.Data.RetryPolicy
    Assembly: linq2db.dll
    Syntax
    public sealed record RetryPolicyOptions : IOptionSet, IConfigurationID, IEquatable<RetryPolicyOptions>

    Constructors

    | Improve this Doc View Source

    RetryPolicyOptions()

    Declaration
    public RetryPolicyOptions()
    | Improve this Doc View Source

    RetryPolicyOptions(IRetryPolicy?, Func<DataConnection, IRetryPolicy?>?, int, TimeSpan, double, double, TimeSpan)

    Declaration
    public RetryPolicyOptions(IRetryPolicy? RetryPolicy = null, Func<DataConnection, IRetryPolicy?>? Factory = null, int MaxRetryCount = 0, TimeSpan MaxDelay = default, double RandomFactor = 0, double ExponentialBase = 0, TimeSpan Coefficient = default)
    Parameters
    Type Name Description
    IRetryPolicy RetryPolicy

    Retry policy for new DataConnection instance.

    Func<DataConnection, IRetryPolicy> Factory

    Retry policy factory method, used to create retry policy for new DataConnection instance. If factory method is not set, retry policy is not used.

    int MaxRetryCount

    The number of retry attempts.

    TimeSpan MaxDelay

    The maximum time delay between retries, must be nonnegative.

    double RandomFactor

    The maximum random factor, must not be lesser than 1.

    double ExponentialBase

    The base for the exponential function used to compute the delay between retries, must be positive.

    TimeSpan Coefficient

    The coefficient for the exponential function used to compute the delay between retries, must be nonnegative.

    Properties

    | Improve this Doc View Source

    Coefficient

    The coefficient for the exponential function used to compute the delay between retries, must be nonnegative.

    Declaration
    public TimeSpan Coefficient { get; init; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    ExponentialBase

    The base for the exponential function used to compute the delay between retries, must be positive.

    Declaration
    public double ExponentialBase { get; init; }
    Property Value
    Type Description
    double
    | Improve this Doc View Source

    Factory

    Retry policy factory method, used to create retry policy for new DataConnection instance. If factory method is not set, retry policy is not used.

    Declaration
    public Func<DataConnection, IRetryPolicy?>? Factory { get; init; }
    Property Value
    Type Description
    Func<DataConnection, IRetryPolicy>
    | Improve this Doc View Source

    MaxDelay

    The maximum time delay between retries, must be nonnegative.

    Declaration
    public TimeSpan MaxDelay { get; init; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    MaxRetryCount

    The number of retry attempts.

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

    RandomFactor

    The maximum random factor, must not be lesser than 1.

    Declaration
    public double RandomFactor { get; init; }
    Property Value
    Type Description
    double
    | Improve this Doc View Source

    RetryPolicy

    Retry policy for new DataConnection instance.

    Declaration
    public IRetryPolicy? RetryPolicy { get; init; }
    Property Value
    Type Description
    IRetryPolicy

    Methods

    | Improve this Doc View Source

    Equals(RetryPolicyOptions?)

    Declaration
    public bool Equals(RetryPolicyOptions? other)
    Parameters
    Type Name Description
    RetryPolicyOptions other
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    Object.GetHashCode()

    Implements

    IOptionSet
    IConfigurationID
    System.IEquatable<T>

    Extension Methods

    DataOptionsExtensions.WithCoefficient(RetryPolicyOptions, TimeSpan)
    DataOptionsExtensions.WithExponentialBase(RetryPolicyOptions, double)
    DataOptionsExtensions.WithFactory(RetryPolicyOptions, Func<DataConnection, IRetryPolicy?>?)
    DataOptionsExtensions.WithMaxDelay(RetryPolicyOptions, TimeSpan)
    DataOptionsExtensions.WithMaxRetryCount(RetryPolicyOptions, int)
    DataOptionsExtensions.WithRandomFactor(RetryPolicyOptions, double)
    DataOptionsExtensions.WithRetryPolicy(RetryPolicyOptions, IRetryPolicy)
    Sql.IsDistinctFrom<T>(T, T)
    Sql.IsNotDistinctFrom<T>(T, T)
    Map.DeepCopy<T>(T)
    SqlExtensions.In<T>(T, T, T, T)
    SqlExtensions.In<T>(T, T, T)
    SqlExtensions.In<T>(T, params T[])
    SqlExtensions.In<T>(T, IEnumerable<T>)
    SqlExtensions.In<T>(T, IQueryable<T>)
    SqlExtensions.NotIn<T>(T, T, T, T)
    SqlExtensions.NotIn<T>(T, T, T)
    SqlExtensions.NotIn<T>(T, params T[])
    SqlExtensions.NotIn<T>(T, IEnumerable<T>)
    SqlExtensions.NotIn<T>(T, IQueryable<T>)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2011-2023 linq2db.com

    Generated by DocFX