Table of Contents

Class Configuration.RetryPolicy

Namespace
LinqToDB.Common
Assembly
linq2db.dll

Retry policy global settings.

public static class Configuration.RetryPolicy
Inheritance
Configuration.RetryPolicy

Properties

DefaultCoefficient

The default coefficient for the exponential function used to compute the delay between retries, must be nonnegative. Default value: 1 second.

public static TimeSpan DefaultCoefficient { get; set; }

Property Value

TimeSpan

DefaultExponentialBase

The default base for the exponential function used to compute the delay between retries, must be positive. Default value: 2.

public static double DefaultExponentialBase { get; set; }

Property Value

double

DefaultMaxDelay

The default maximum time delay between retries, must be nonnegative. Default value: 30 seconds.

public static TimeSpan DefaultMaxDelay { get; set; }

Property Value

TimeSpan

DefaultMaxRetryCount

The default number of retry attempts. Default value: 5.

public static int DefaultMaxRetryCount { get; set; }

Property Value

int

DefaultRandomFactor

The default maximum random factor, must not be lesser than 1. Default value: 1.1.

public static double DefaultRandomFactor { get; set; }

Property Value

double

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. Not set by default.

public static Func<DataConnection, IRetryPolicy?>? Factory { get; set; }

Property Value

Func<DataConnection, IRetryPolicy>

Options

Default RetryPolicyOptions options. Automatically synchronized with other settings in Configuration.RetryPolicy class.

public static RetryPolicyOptions Options { get; set; }

Property Value

RetryPolicyOptions

UseDefaultPolicy

Status of use of default retry policy. Getter returns true if default retry policy used, and false if custom retry policy used or retry policy is not set. Setter sets Factory to default retry policy factory if value is true, otherwise removes retry policy.

public static bool UseDefaultPolicy { get; set; }

Property Value

bool