C# Класс Amazon.Runtime.RetryPolicy

A retry policy specifies all aspects of retry behavior. This includes conditions when the request should be retried, checks of retry limit, preparing the request before retry and introducing delay (backoff) before retries.
Показать файл Открыть проект

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

Метод Описание
CanRetry ( IExecutionContext executionContext ) : bool

Returns true if the request is in a state where it can be retried, else false.

NotifySuccess ( IExecutionContext executionContext ) : void

Virtual method that gets called on a successful request response.

OnRetry ( IExecutionContext executionContext ) : bool

Virtual method that gets called before a retry request is initiated. The value returned is True by default(retry throttling feature is disabled).

Retry ( IExecutionContext executionContext, Exception exception ) : bool

Checks if a retry should be performed with the given execution context and exception.

RetryAsync ( IExecutionContext executionContext, Exception exception ) : Task

Checks if a retry should be performed with the given execution context and exception.

RetryForException ( IExecutionContext executionContext, Exception exception ) : bool

Return true if the request should be retried for the given exception.

RetryForExceptionAsync ( IExecutionContext executionContext, Exception exception ) : Task

Return true if the request should be retried for the given exception.

RetryLimitReached ( IExecutionContext executionContext ) : bool

Checks if the retry limit is reached.

WaitBeforeRetry ( IExecutionContext executionContext ) : void

Waits before retrying a request.

WaitBeforeRetryAsync ( IExecutionContext executionContext ) : Task

Waits before retrying a request.

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

Метод Описание
GetWebData ( AmazonServiceException ase ) : IWebResponseData
IsClockskew ( IExecutionContext executionContext, Exception exception ) : bool
RetrySync ( IExecutionContext executionContext, Exception exception ) : bool?

Perform the processor-bound portion of the Retry logic. This is shared by the sync, async, and APM versions of the Retry method.

TryParseDateHeader ( AmazonServiceException ase, DateTime &serverTime ) : bool
TryParseExceptionMessage ( AmazonServiceException ase, DateTime &serverTime ) : bool

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

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

Returns true if the request is in a state where it can be retried, else false.
public abstract CanRetry ( IExecutionContext executionContext ) : bool
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Результат bool

NotifySuccess() публичный Метод

Virtual method that gets called on a successful request response.
public NotifySuccess ( IExecutionContext executionContext ) : void
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Результат void

OnRetry() публичный Метод

Virtual method that gets called before a retry request is initiated. The value returned is True by default(retry throttling feature is disabled).
public OnRetry ( IExecutionContext executionContext ) : bool
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Результат bool

Retry() публичный Метод

Checks if a retry should be performed with the given execution context and exception.
public Retry ( IExecutionContext executionContext, Exception exception ) : bool
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
exception Exception The exception throw after issuing the request.
Результат bool

RetryAsync() публичный Метод

Checks if a retry should be performed with the given execution context and exception.
public RetryAsync ( IExecutionContext executionContext, Exception exception ) : Task
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
exception Exception The exception throw after issuing the request.
Результат Task

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

Return true if the request should be retried for the given exception.
public abstract RetryForException ( IExecutionContext executionContext, Exception exception ) : bool
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
exception Exception The exception thrown by the previous request.
Результат bool

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

Return true if the request should be retried for the given exception.
public abstract RetryForExceptionAsync ( IExecutionContext executionContext, Exception exception ) : Task
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
exception Exception The exception thrown by the previous request.
Результат Task

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

Checks if the retry limit is reached.
public abstract RetryLimitReached ( IExecutionContext executionContext ) : bool
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Результат bool

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

Waits before retrying a request.
public abstract WaitBeforeRetry ( IExecutionContext executionContext ) : void
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Результат void

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

Waits before retrying a request.
public abstract WaitBeforeRetryAsync ( IExecutionContext executionContext ) : Task
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Результат Task