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)
      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
      Returns:
      this.
    • initialInterval

      public RetryProperties.Builder initialInterval(Duration initialInterval)
      The initial interval before the first retry attempt.
      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. This should only be used for testing purposes
      Overrides:
      buildUnchecked in class ValidatedBuilder<RetryProperties>
      Returns:
      the object being built
    • toString

      public String toString()
      Overrides:
      toString in class Object