Class RetryConfigBuilder<T extends Response>
java.lang.Object
com.linecorp.armeria.client.retry.RetryConfigBuilder<T>
Builds a
RetryConfig
.
A RetryConfig
instance encapsulates the used RetryRule
, maxTotalAttempts
,
and responseTimeoutMillisForEachAttempt
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly-createdRetryConfig
from thisRetryConfigBuilder
's values.maxContentLength
(int maxContentLength) Sets the specifiedmaxContentLength
to be used with aRetryRuleWithContent
.maxTotalAttempts
(int maxTotalAttempts) Sets the specifiedmaxTotalAttempts
.responseTimeoutForEachAttempt
(Duration responseTimeoutMillisForEachAttempt) Sets the specifiedDuration
by converting responseTimeoutForEachAttempt to millis.responseTimeoutMillisForEachAttempt
(long responseTimeoutMillisForEachAttempt) Sets the specifiedresponseTimeoutMillisForEachAttempt
.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
-