Share via


RetryPolicy<T> Class

 

Provides a generic version of the RetryPolicy class.

Namespace:   Microsoft.WindowsAzure.Common.TransientFaultHandling
Assembly:  Microsoft.WindowsAzure.Common (in Microsoft.WindowsAzure.Common.dll)

Inheritance Hierarchy

System.Object
  Microsoft.WindowsAzure.Common.TransientFaultHandling.RetryPolicy
    Microsoft.WindowsAzure.Common.TransientFaultHandling.RetryPolicy<T>

Syntax

public class RetryPolicy<T> : RetryPolicy
where T : new(), ITransientErrorDetectionStrategy
generic<typename T>
where T : gcnew(), ITransientErrorDetectionStrategy
public ref class RetryPolicy : RetryPolicy
type RetryPolicy<'T when 'T : new() and ITransientErrorDetectionStrategy> = 
    class
        inherit RetryPolicy
    end
Public Class RetryPolicy(Of T As { ITransientErrorDetectionStrategy, New })
    Inherits RetryPolicy

Type Parameters

Constructors

Name Description
System_CAPS_pubmethod RetryPolicy<T>(Int32)

Initializes a new instance of the RetryPolicy<T> class with the specified number of retry attempts and the default fixed time interval between retries.

System_CAPS_pubmethod RetryPolicy<T>(Int32, TimeSpan)

Initializes a new instance of the RetryPolicy<T> class with the specified number of retry attempts and a fixed time interval between retries.

System_CAPS_pubmethod RetryPolicy<T>(Int32, TimeSpan, TimeSpan)

Initializes a new instance of the RetryPolicy<T> class with the specified number of retry attempts and parameters defining the progressive delay between retries.

System_CAPS_pubmethod RetryPolicy<T>(Int32, TimeSpan, TimeSpan, TimeSpan)

Initializes a new instance of the RetryPolicy<T> class with the specified number of retry attempts and backoff parameters for calculating the exponential delay between retries.

System_CAPS_pubmethod RetryPolicy<T>(RetryStrategy)

Initializes a new instance of the RetryPolicy<T> class with the specified number of retry attempts and parameters defining the progressive delay between retries.

Properties

Name Description
System_CAPS_pubproperty ErrorDetectionStrategy

Gets the instance of the error detection strategy.(Inherited from RetryPolicy.)

System_CAPS_pubproperty RetryStrategy

Gets the retry strategy.(Inherited from RetryPolicy.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod ExecuteAction(Action)

Repetitively executes the specified action while it satisfies the current retry policy.(Inherited from RetryPolicy.)

System_CAPS_pubmethod ExecuteAction<TResult>(Func<TResult>)

Repetitively executes the specified action while it satisfies the current retry policy.(Inherited from RetryPolicy.)

System_CAPS_pubmethod ExecuteAsync(Func<Task>)

Repetitively executes the specified asynchronous task while it satisfies the current retry policy.(Inherited from RetryPolicy.)

System_CAPS_pubmethod ExecuteAsync(Func<Task>, CancellationToken)

Repetitively executes the specified asynchronous task while it satisfies the current retry policy.(Inherited from RetryPolicy.)

System_CAPS_pubmethod ExecuteAsync<TResult>(Func<Task<TResult>>)

Repeatedly executes the specified asynchronous task while it satisfies the current retry policy.(Inherited from RetryPolicy.)

System_CAPS_pubmethod ExecuteAsync<TResult>(Func<Task<TResult>>, CancellationToken)

Repeatedly executes the specified asynchronous task while it satisfies the current retry policy.(Inherited from RetryPolicy.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod OnRetrying(Int32, Exception, TimeSpan)

Notifies the subscribers whenever a retry condition is encountered.(Inherited from RetryPolicy.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Events

Name Description
System_CAPS_pubevent Retrying

An instance of a callback delegate that will be invoked whenever a retry condition is encountered.(Inherited from RetryPolicy.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsAzure.Common.TransientFaultHandling Namespace

Return to top