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 Summary
Modifier and Type Method Description RetryConfig<T>
build()
Returns a newly-createdRetryConfig
from thisRetryConfigBuilder
's values.RetryConfigBuilder<T>
maxContentLength(int maxContentLength)
Sets the specifiedmaxContentLength
to be used with aRetryRuleWithContent
.RetryConfigBuilder<T>
maxTotalAttempts(int maxTotalAttempts)
Sets the specifiedmaxTotalAttempts
.RetryConfigBuilder<T>
responseTimeoutForEachAttempt(Duration responseTimeoutMillisForEachAttempt)
Sets the specifiedDuration
by converting responseTimeoutForEachAttempt to millis.RetryConfigBuilder<T>
responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
Sets the specifiedresponseTimeoutMillisForEachAttempt
.String
toString()
-
Method Details
-
maxContentLength
Sets the specifiedmaxContentLength
to be used with aRetryRuleWithContent
. -
maxTotalAttempts
Sets the specifiedmaxTotalAttempts
. -
responseTimeoutMillisForEachAttempt
public RetryConfigBuilder<T> responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)Sets the specifiedresponseTimeoutMillisForEachAttempt
. -
responseTimeoutForEachAttempt
public RetryConfigBuilder<T> responseTimeoutForEachAttempt(Duration responseTimeoutMillisForEachAttempt)Sets the specifiedDuration
by converting responseTimeoutForEachAttempt to millis. -
build
Returns a newly-createdRetryConfig
from thisRetryConfigBuilder
's values. -
toString
-