Class RetryStrategy.ConstantInterval

java.lang.Object
com.here.platform.data.client.utils.RetryStrategy.ConstantInterval
All Implemented Interfaces:
RetryStrategy, Serializable, scala.Equals, scala.Product
Enclosing interface:
RetryStrategy

public static final class RetryStrategy.ConstantInterval extends Object implements RetryStrategy, scala.Product, Serializable
A strategy that constantly returns the given interval
See Also:
  • Constructor Details

    • ConstantInterval

      public ConstantInterval(scala.concurrent.duration.FiniteDuration interval)
  • Method Details

    • interval

      public scala.concurrent.duration.FiniteDuration interval()
    • result

      public scala.util.Right<scala.runtime.Nothing$,scala.Tuple2<scala.concurrent.duration.FiniteDuration,RetryStrategy.ConstantInterval>> result()
    • apply

      public scala.util.Either<String,scala.Tuple2<scala.concurrent.duration.FiniteDuration,RetryStrategy>> apply(scala.concurrent.duration.FiniteDuration attemptDuration)
      Description copied from interface: RetryStrategy
      Decides whether and when to retry an operation, given the duration of the most recent attempt.

      Why is this signature so complex, you ask? To be able to express both limits on retrying, and to support the logic of RetryStrategy.AdaptiveExponential.

      Specified by:
      apply in interface RetryStrategy
      Parameters:
      attemptDuration - duration of the most recent attempt
      Returns:
      a Left containing the reason for not retrying the request if the operation should not be retried, or a Right containing the minimum interval between the start of the most recent attempt and the start of the retry together with the RetryStrategy to use if this retry fails.