Interval

public enum Interval

Represents the interval mechanism which used in a DelayRetryStrategy.

  • The next retry attempt should happen in fixed seconds. For example, if the associated value is 3, the attempts happens after 3 seconds after the previous decision is made.

    Declaration

    Swift

    case seconds(TimeInterval)
  • The next retry attempt should happen in an accumulated duration. For example, if the associated value is 3, the attempts happens with interval of 3, 6, 9, 12, … seconds.

    Declaration

    Swift

    case accumulated(TimeInterval)
  • Uses a block to determine the next interval. The current retry count is given as a parameter.

    Declaration

    Swift

    case custom(block: (_ retriedCount: Int) -> TimeInterval)