C# Class 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.
Afficher le fichier Open project: aws/aws-sdk-net

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

CanRetry() public abstract méthode

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.
Résultat bool

NotifySuccess() public méthode

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.
Résultat void

OnRetry() public méthode

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.
Résultat bool

Retry() public méthode

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.
Résultat bool

RetryAsync() public méthode

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.
Résultat Task

RetryForException() public abstract méthode

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.
Résultat bool

RetryForExceptionAsync() public abstract méthode

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.
Résultat Task

RetryLimitReached() public abstract méthode

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.
Résultat bool

WaitBeforeRetry() public abstract méthode

Waits before retrying a request.
public abstract WaitBeforeRetry ( IExecutionContext executionContext ) : void
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Résultat void

WaitBeforeRetryAsync() public abstract méthode

Waits before retrying a request.
public abstract WaitBeforeRetryAsync ( IExecutionContext executionContext ) : Task
executionContext IExecutionContext The execution context which contains both the /// requests and response context.
Résultat Task