Class RetryingRpcClientBuilder
java.lang.Object
com.linecorp.armeria.client.retry.AbstractRetryingClientBuilder<RpcResponse>
com.linecorp.armeria.client.retry.RetryingRpcClientBuilder
Builds a new
RetryingRpcClient
or its decorator function.-
Method Summary
Modifier and TypeMethodDescriptionReturns a newly-createdRetryingRpcClient
based on the properties of this builder.maxTotalAttempts
(int maxTotalAttempts) Sets the maximum allowed number of total attempts.Function<? super RpcClient,
RetryingRpcClient> Returns a newly-created decorator that decorates anRpcClient
with a newRetryingRpcClient
based on the properties of this builder.responseTimeoutForEachAttempt
(Duration responseTimeoutForEachAttempt) Sets the response timeout for each attempt.responseTimeoutMillisForEachAttempt
(long responseTimeoutMillisForEachAttempt) Sets the response timeout for each attempt in milliseconds.Methods inherited from class com.linecorp.armeria.client.retry.AbstractRetryingClientBuilder
toString
-
Method Details
-
build
Returns a newly-createdRetryingRpcClient
based on the properties of this builder. -
newDecorator
Returns a newly-created decorator that decorates anRpcClient
with a newRetryingRpcClient
based on the properties of this builder. -
maxTotalAttempts
Description copied from class:AbstractRetryingClientBuilder
Sets the maximum allowed number of total attempts. If unspecified, the value fromFlags.defaultMaxTotalAttempts()
will be used.- Overrides:
maxTotalAttempts
in classAbstractRetryingClientBuilder<RpcResponse>
- Returns:
this
to support method chaining.
-
responseTimeoutMillisForEachAttempt
public RetryingRpcClientBuilder responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt) Description copied from class:AbstractRetryingClientBuilder
Sets the response timeout for each attempt in milliseconds. When requests inAbstractRetryingClient
are made, corresponding responses are timed out by this value.0
disables the timeout. It will be set by the default value inFlags.defaultResponseTimeoutMillis()
, if the client does not specify.- Overrides:
responseTimeoutMillisForEachAttempt
in classAbstractRetryingClientBuilder<RpcResponse>
- Returns:
this
to support method chaining.- See Also:
-
responseTimeoutForEachAttempt
public RetryingRpcClientBuilder responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt) Description copied from class:AbstractRetryingClientBuilder
Sets the response timeout for each attempt. When requests inAbstractRetryingClient
are made, corresponding responses are timed out by this value.0
disables the timeout.- Overrides:
responseTimeoutForEachAttempt
in classAbstractRetryingClientBuilder<RpcResponse>
- Returns:
this
to support method chaining.- See Also:
-