C# Класс 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.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
StandardMaxBackoff System.TimeSpan
StandardMinBackoff System.TimeSpan

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

RetryN() публичный статический Метод

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
Результат SecUtility.ProviderRetryPolicy

RetryN() публичный статический Метод

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
Результат SecUtility.ProviderRetryPolicy

Описание свойств

StandardMaxBackoff публичное статическое свойство

public static TimeSpan,System StandardMaxBackoff
Результат System.TimeSpan

StandardMinBackoff публичное статическое свойство

public static TimeSpan,System StandardMinBackoff
Результат System.TimeSpan