C# Class Microsoft.WindowsAzure.Samples.Storage.Providers.ProviderRetryPolicies

We are using this retry policies for only one purpose: the ASP providers often read data from the server, process it locally and then write the result back to the server. The problem is that the row that has been read might have changed between the read and write operation. This retry policy is used to retry the whole process in this case. Provides definitions for some standard retry policies.
Exibir arquivo Open project: WindowsAzure-Toolkits/wa-toolkit-wp-nugets

Public Properties

Property Type Description
StandardMaxBackoff System.TimeSpan
StandardMinBackoff System.TimeSpan

Public Methods

Method Description
RetryN ( int numberOfRetries, System.TimeSpan deltaBackoff ) : SecUtility.ProviderRetryPolicy

Policy that retries a specified number of times with an exponential backoff scheme

For this retry policy, the minimum amount of milliseconds between retries is given by the StandardMinBackoff constant, and the maximum backoff is predefined by the StandardMaxBackoff constant. Otherwise, the backoff is calculated as random(2^currentRetry) * deltaBackoff.

RetryN ( int numberOfRetries, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, System.TimeSpan deltaBackoff ) : SecUtility.ProviderRetryPolicy

Policy that retries a specified number of times with an exponential backoff scheme

For this retry policy, the minimum amount of milliseconds between retries is given by the minBackoff parameter, and the maximum backoff is predefined by the maxBackoff parameter. Otherwise, the backoff is calculated as random(2^currentRetry) * deltaBackoff.

Private Methods

Method Description
CalculateCurrentBackoff ( System.TimeSpan minBackoff, System.TimeSpan maxBackoff, System.TimeSpan deltaBackoff, int curRetry ) : int
NoRetry ( System.Action action ) : void

Policy that does no retries i.e., it just invokes action exactly once

RetryNImpl ( System.Action action, int numberOfRetries, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, System.TimeSpan deltaBackoff ) : void

Method Details

RetryN() public static method

Policy that retries a specified number of times with an exponential backoff scheme
For this retry policy, the minimum amount of milliseconds between retries is given by the StandardMinBackoff constant, and the maximum backoff is predefined by the StandardMaxBackoff constant. Otherwise, the backoff is calculated as random(2^currentRetry) * deltaBackoff.
public static RetryN ( int numberOfRetries, System.TimeSpan deltaBackoff ) : SecUtility.ProviderRetryPolicy
numberOfRetries int The number of times to retry. Should be a non-negative number.
deltaBackoff System.TimeSpan The multiplier in the exponential backoff scheme
return SecUtility.ProviderRetryPolicy

RetryN() public static method

Policy that retries a specified number of times with an exponential backoff scheme
For this retry policy, the minimum amount of milliseconds between retries is given by the minBackoff parameter, and the maximum backoff is predefined by the maxBackoff parameter. Otherwise, the backoff is calculated as random(2^currentRetry) * deltaBackoff.
public static RetryN ( int numberOfRetries, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, System.TimeSpan deltaBackoff ) : SecUtility.ProviderRetryPolicy
numberOfRetries int The number of times to retry. Should be a non-negative number
minBackoff System.TimeSpan The minimum backoff interval
maxBackoff System.TimeSpan
deltaBackoff System.TimeSpan The multiplier in the exponential backoff scheme
return SecUtility.ProviderRetryPolicy

Property Details

StandardMaxBackoff public_oe static_oe property

public static TimeSpan,System StandardMaxBackoff
return System.TimeSpan

StandardMinBackoff public_oe static_oe property

public static TimeSpan,System StandardMinBackoff
return System.TimeSpan