Class RetryProperties.Builder

java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<RetryProperties>
co.yellowdog.platform.model.RetryProperties.Builder
Enclosing class:
RetryProperties

public static class RetryProperties.Builder extends ValidatedBuilder<RetryProperties>
A builder that can be used to build a new RetryProperties that is automatically validated on build.
  • Method Details

    • maxAttempts

      public RetryProperties.Builder maxAttempts(int maxAttempts)
      The maximum number of retries after the initial request fails. A request is sent at most maxAttempts + 1 times before retries are exhausted.
      Parameters:
      maxAttempts - the maximum number of retries after the initial request
      Returns:
      this.
    • initialInterval

      public RetryProperties.Builder initialInterval(Duration initialInterval)
      The initial interval before the first retry attempt. With Full Jitter applied, the actual interval of the first retry is anywhere between 0 and this value. Subsequent retry intervals grow exponentially.
      Parameters:
      initialInterval - the initial interval before the first retry attempt
      Returns:
      this.
    • maxInterval

      public RetryProperties.Builder maxInterval(Duration maxInterval)
      The maximum interval between retry attempts.
      Parameters:
      maxInterval - the maximum interval between retry attempts
      Returns:
      this.
    • buildUnchecked

      public RetryProperties buildUnchecked()
      Description copied from class: ValidatedBuilder
      Builds the object without enforcing validation constraints. Use this when the object is validated later, for example as part of an enclosing object built with ValidatedBuilder.build(), or when it does not need to be valid on its own.
      Overrides:
      buildUnchecked in class ValidatedBuilder<RetryProperties>
      Returns:
      the object being built
    • toString

      public String toString()
      Overrides:
      toString in class Object