public final class RetryingRpcClientBuilder extends AbstractRetryingClientBuilder<RpcResponse>
RetryingRpcClient or its decorator function.| Constructor and Description |
|---|
RetryingRpcClientBuilder(RetryStrategyWithContent<RpcResponse> retryStrategyWithContent)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
RetryingRpcClient |
build(RpcClient delegate)
Returns a newly-created
RetryingRpcClient based on the properties of this builder. |
RetryingRpcClientBuilder |
maxTotalAttempts(int maxTotalAttempts)
Sets the maximum number of total attempts.
|
Function<? super RpcClient,RetryingRpcClient> |
newDecorator()
Returns a newly-created decorator that decorates an
RpcClient with a new
RetryingRpcClient based on the properties of this builder. |
RetryingRpcClientBuilder |
responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
Sets the response timeout for each attempt.
|
RetryingRpcClientBuilder |
responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
Sets the response timeout for each attempt in milliseconds.
|
toString@Deprecated public RetryingRpcClientBuilder(RetryStrategyWithContent<RpcResponse> retryStrategyWithContent)
RetryingRpcClient.builder(RetryStrategyWithContent).RetryStrategyWithContent.public RetryingRpcClient build(RpcClient delegate)
RetryingRpcClient based on the properties of this builder.public Function<? super RpcClient,RetryingRpcClient> newDecorator()
RpcClient with a new
RetryingRpcClient based on the properties of this builder.public RetryingRpcClientBuilder maxTotalAttempts(int maxTotalAttempts)
AbstractRetryingClientBuilderFlags.defaultMaxTotalAttempts() will be used.maxTotalAttempts in class AbstractRetryingClientBuilder<RpcResponse>this to support method chaining.public RetryingRpcClientBuilder responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
AbstractRetryingClientBuilderAbstractRetryingClient are made,
corresponding responses are timed out by this value. 0 disables the timeout.
It will be set by the default value in Flags.defaultResponseTimeoutMillis(), if the client
dose not specify.responseTimeoutMillisForEachAttempt in class AbstractRetryingClientBuilder<RpcResponse>this to support method chaining.public RetryingRpcClientBuilder responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
AbstractRetryingClientBuilderAbstractRetryingClient are made,
corresponding responses are timed out by this value. 0 disables the timeout.responseTimeoutForEachAttempt in class AbstractRetryingClientBuilder<RpcResponse>this to support method chaining.Copyright © 2020 LeanCloud. All rights reserved.