Class RetryConfigBuilder<T extends Response>

java.lang.Object
com.linecorp.armeria.client.retry.RetryConfigBuilder<T>

public final class RetryConfigBuilder<T extends Response>
extends Object
Builds a RetryConfig. A RetryConfig instance encapsulates the used RetryRule, maxTotalAttempts, and responseTimeoutMillisForEachAttempt.
  • Method Details

    • maxContentLength

      public RetryConfigBuilder<T> maxContentLength​(int maxContentLength)
      Sets the specified maxContentLength to be used with a RetryRuleWithContent.
    • maxTotalAttempts

      public RetryConfigBuilder<T> maxTotalAttempts​(int maxTotalAttempts)
      Sets the specified maxTotalAttempts.
    • responseTimeoutMillisForEachAttempt

      public RetryConfigBuilder<T> responseTimeoutMillisForEachAttempt​(long responseTimeoutMillisForEachAttempt)
      Sets the specified responseTimeoutMillisForEachAttempt.
    • responseTimeoutForEachAttempt

      public RetryConfigBuilder<T> responseTimeoutForEachAttempt​(Duration responseTimeoutMillisForEachAttempt)
      Sets the specified Duration by converting responseTimeoutForEachAttempt to millis.
    • build

      public RetryConfig<T> build()
      Returns a newly-created RetryConfig from this RetryConfigBuilder's values.
    • toString

      public String toString()
      Overrides:
      toString in class Object