IntervalProxy
public enum IntervalProxy
Delay strategy used between retries.
-
Default initial delay (seconds) for exponential strategies.
Declaration
Swift
public static let DefaultInitialTimeInterval: TimeInterval
-
Default multiplier for exponential strategies.
Declaration
Swift
public static let DefaultExponentialBackoffScaleRate: Double
-
Always use a fixed delay.
Declaration
Swift
case fixed(timeInterval: TimeInterval = 0)
-
Exponential backoff that multiplies delay on each
next()
.Declaration
Swift
case exponentialBackoff( initialTimeInterval: TimeInterval = DefaultInitialTimeInterval, scaleRate: Double = DefaultExponentialBackoffScaleRate )
-
exponentialBackoffBeforeFixed(initialTimeInterval:
originalInitialInterval: maxExponentialBackoffCount: scaleRate: ) Exponential backoff for up to
maxExponentialBackoffCount
iterations, then switch to fixed.Declaration
Swift
case exponentialBackoffBeforeFixed( initialTimeInterval: TimeInterval = DefaultInitialTimeInterval, originalInitialInterval: TimeInterval = DefaultInitialTimeInterval, maxExponentialBackoffCount: UInt = 0, scaleRate: Double = DefaultExponentialBackoffScaleRate )
-
Fixed delay for up to
maxFixedCount
iterations, then switch to exponential backoff.Declaration
Swift
case exponentialBackoffAfterFixed( initialTimeInterval: TimeInterval = DefaultInitialTimeInterval, originalInitialInterval: TimeInterval = DefaultInitialTimeInterval, maxFixedCount: UInt = 0, scaleRate: Double = DefaultExponentialBackoffScaleRate )
-
Returns the next stage in the delay sequence.
Declaration
Swift
public func next() -> RetryCount.IntervalProxy
-
The current delay (seconds) represented by this proxy.
Declaration
Swift
public var timeInterval: TimeInterval { get }