ARTRetryDelayCalculator

Objective-C

@protocol ARTRetryDelayCalculator

Swift

protocol RetryDelayCalculator

Consider an operation which can fail. If we attempt to perform the operation and it fails, we may wish to start performing a sequence of retries, until success or some other termination condition is achieved. An ARTRetryDelayCalculator describes the amount of time that we wish to wait before performing each retry in this sequence.

  • Returns the duration that should be waited before performing a retry of the operation.

    Declaration

    Objective-C

    - (NSTimeInterval)delayForRetryNumber:(NSInteger)retryNumber;

    Swift

    func delay(forRetryNumber retryNumber: Int) -> TimeInterval