AZSRetryPolicy Protocol Reference

Conforms to NSObject
Declared in AZSRetryPolicy.h

Overview

A Retry Policy is what the library will call to determine if a failing request should be retried or not. The important method is evaluateRetryContext. This takes in an AZSRetryContext as input, which contains all the necessary data to determine whether or not the request should be retried. It outputs an AZSRetryInfo object, which determines whether or not the library will retry the request, and if so, how long the library will wait.

– evaluateRetryContext:withOperationContext: required method

The method that evaluates the RetryContext to determine if the request should be retried or not.

- (AZSRetryInfo *)evaluateRetryContext:(AZSRetryContext *)retryContext withOperationContext:(AZSNullable AZSOperationContext *)operationContext

Parameters

retryContext

The AZSRetryContext containing information about the most recent request.

operationContext

The AZSOperationContext for the entire operation thus far.

Return Value

An AZSRetryInfo object that contains whether or not the request should be retried, and if so, how long to wait until the next trial.

Discussion

The method that evaluates the RetryContext to determine if the request should be retried or not.

Declared In

AZSRetryPolicy.h

– clone required method

Clone this retry policy. Required internally in the library. Must return a fresh instance with the same parameters.

- (id<AZSRetryPolicy>)clone

Return Value

The cloned retry policy.

Discussion

Clone this retry policy. Required internally in the library. Must return a fresh instance with the same parameters.

Declared In

AZSRetryPolicy.h