AZSRetryPolicyLinear Class Reference

Inherits from NSObject
Conforms to AZSRetryPolicy
Declared in AZSRetryPolicy.h
AZSRetryPolicy.m

Overview

A retry policy with a linear retry interval.

This policy will evaluate whether or not the request should be retried depending on the HTTP status code of the response. If the status code indicates that the request should be retried, it will specify a constant wait time, regardless of the retry count.

Other Methods

  maxAttempts

The maximum number of retries the policy will allow.

@property NSInteger maxAttempts

Discussion

The maximum number of retries the policy will allow.

Declared In

AZSRetryPolicy.h

  waitTimeBetweenRetries

The time the retry policy will specify to wait between retries.

@property NSTimeInterval waitTimeBetweenRetries

Discussion

The time the retry policy will specify to wait between retries.

Declared In

AZSRetryPolicy.h

– init

Initializes a fresh instance of the linear retry policy.

- (instancetype)init

Return Value

The newly allocated instance.

Discussion

Initializes a fresh instance of the linear retry policy.

Declared In

AZSRetryPolicy.h

– initWithMaxAttempts:waitTimeBetweenRetries:

Initializes a fresh instance of the linear retry policy.

- (instancetype)initWithMaxAttempts:(NSInteger)maxAttempts waitTimeBetweenRetries:(NSTimeInterval)waitTimeBetweenRetries

Parameters

maxAttempts

The maximum number of retries the policy will allow.

waitTimeBetweenRetries

The time the retry policy will specify to wait between retries.

Return Value

The newly allocated instance.

Discussion

Initializes a fresh instance of the linear retry policy.

Declared In

AZSRetryPolicy.h

Other Methods

– evaluateRetryContext:withOperationContext:

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

- (AZSRetryInfo *)evaluateRetryContext:(AZSRetryContext *)retryContext withOperationContext:(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

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