RetryPolicy
public enum RetryPolicy : Equatable, Decodable
Some of the operations of the SDK allow to retry the operation (or part of the operation). This object defines the different types of retry mode that can be used.
-
Do not retry: in case of failure the operation will report the error without retrying.
Declaration
Swift
case noRetry
-
The operation will be retried periodically with a maximum number of tries.
Declaration
Swift
case constant(maxRetries: Int, delayInSeconds: TimeInterval)
Parameters
maxRetries
the maximum number of retries.
delayInSeconds
the period of time in seconds.
-
The operation will be retried at exponential intervals. Delay will be incremented by multiplier after each iteration (multiplier = 0.5 means 50% increment).
Declaration
Swift
case exponential(maxRetries: Int, initialDelayInSeconds: TimeInterval, multiplier: Double, maximumDelayInSeconds: TimeInterval)
Parameters
maxRetries
the maximum number of retries.
initialDelayInSeconds
the delay to be waited before executing the first retry.
multiplier
the multiplier of the delay interval.
maximumDelayInSeconds
the maximum time interval of the delay in seconds.