Class RetryProperties

java.lang.Object
co.yellowdog.platform.model.RetryProperties

public class RetryProperties extends Object
Defines properties that control services client retry behaviour
  • Field Details

    • DEFAULT_MAX_ATTEMPTS

      public static final int DEFAULT_MAX_ATTEMPTS
      The default max attempt count (3)
      See Also:
    • DEFAULT_INITIAL_RETRY_INTERVAL

      public static final Duration DEFAULT_INITIAL_RETRY_INTERVAL
      The default initial retry interval (5 seconds)
    • DEFAULT_MAX_RETRY_INTERVAL

      public static final Duration DEFAULT_MAX_RETRY_INTERVAL
      The default maximum retry interval (1 minute)
  • Method Details

    • builder

      public static RetryProperties.Builder builder()
    • toBuilder

      public RetryProperties.Builder toBuilder()
    • getMaxAttempts

      public int getMaxAttempts()
      Set the number of attempts before retries are exhausted. Includes the initial attempt before the retries begin.
      Returns:
      the number of attempts before retries are exhausted
    • getInitialInterval

      public Duration getInitialInterval()
      The initial interval before the first retry attempt.
      Returns:
      the initial interval before the first retry attempt
    • getMaxInterval

      public Duration getMaxInterval()
      The maximum interval between retry attempts.
      Returns:
      the maximum interval between retry attempts
    • setMaxAttempts

      public void setMaxAttempts(int maxAttempts)
      Set the number of attempts before retries are exhausted. Includes the initial attempt before the retries begin.
      Parameters:
      maxAttempts - the number of attempts before retries are exhausted
    • setInitialInterval

      public void setInitialInterval(Duration initialInterval)
      The initial interval before the first retry attempt.
      Parameters:
      initialInterval - the initial interval before the first retry attempt
    • setMaxInterval

      public void setMaxInterval(Duration maxInterval)
      The maximum interval between retry attempts.
      Parameters:
      maxInterval - the maximum interval between retry attempts
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object