Table of Contents

Class RetryHandler

Namespace
Amazon.Runtime.Internal
Assembly
AWSSDK.Core.dll

The retry handler has the generic logic for retrying requests. It uses a retry policy which specifies when a retry should be performed.

public class RetryHandler : PipelineHandler, IPipelineHandler
Inheritance
RetryHandler
Implements
Inherited Members

Constructors

RetryHandler(RetryPolicy)

Constructor which takes in a retry policy.

public RetryHandler(RetryPolicy retryPolicy)

Parameters

retryPolicy RetryPolicy

Retry Policy

Properties

Logger

The logger used to log messages.

public override ILogger Logger { get; set; }

Property Value

ILogger

RetryPolicy

The retry policy which specifies when a retry should be performed.

public RetryPolicy RetryPolicy { get; }

Property Value

RetryPolicy

Methods

InvokeAsync<T>(IExecutionContext)

Invokes the inner handler and performs a retry, if required as per the retry policy.

public override Task<T> InvokeAsync<T>(IExecutionContext executionContext) where T : AmazonWebServiceResponse, new()

Parameters

executionContext IExecutionContext

The execution context, it contains the request and response context.

Returns

Task<T>

A task that represents the asynchronous operation.

Type Parameters

T

The response type for the current request.

InvokeSync(IExecutionContext)

Invokes the inner handler and performs a retry, if required as per the retry policy.

public override void InvokeSync(IExecutionContext executionContext)

Parameters

executionContext IExecutionContext

The execution context which contains both the requests and response context.