SaaS CMS has officially launched! Learn more now.

Class SqlTransientErrorsRetryPolicy

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Helper class to handle connection retry

Inheritance
System.Object
SqlTransientErrorsRetryPolicy
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Data.Providers
Assembly: EPiServer.Data.dll
Version: 7.19.2
Syntax
public class SqlTransientErrorsRetryPolicy : RetryPolicy

Constructors

SqlTransientErrorsRetryPolicy(IEnumerable<Int32>, Int32, TimeSpan)

This class supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public SqlTransientErrorsRetryPolicy(IEnumerable<int> detectErrors, int retries, TimeSpan retryDelay)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Int32> detectErrors
System.Int32 retries
System.TimeSpan retryDelay

Properties

Retries

This class supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public int Retries { get; set; }
Property Value
Type Description
System.Int32

RetryDelay

This class supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public TimeSpan RetryDelay { get; set; }
Property Value
Type Description
System.TimeSpan

Methods

Execute<TResult>(Func<TResult>)

This class supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public override TResult Execute<TResult>(Func<TResult> method)
Parameters
Type Name Description
System.Func<TResult> method
Returns
Type Description
TResult
Type Parameters
Name Description
TResult
Overrides
EPiServer.Data.Providers.RetryPolicy.Execute<TResult>(System.Func<TResult>)

GetSqlErrors(DbException)

Declaration
protected virtual IEnumerable<int> GetSqlErrors(DbException ex)
Parameters
Type Name Description
System.Data.Common.DbException ex
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Int32>

IsTransientException(DbException)

Determines whether the specified exception represents a transient failure that can be compensated by a retry.

Declaration
protected virtual bool IsTransientException(DbException ex)
Parameters
Type Name Description
System.Data.Common.DbException ex

The exception object to be verified.

Returns
Type Description
System.Boolean

True if the specified exception is considered as transient, otherwise false.

Extension Methods