public abstract class RetryingClientBuilder<O extends Response> extends Object
RetryingClient or its decorator function.| Modifier | Constructor and Description |
|---|---|
protected |
RetryingClientBuilder(RetryStrategy retryStrategy)
Creates a new builder with the specified
RetryStrategy. |
protected |
RetryingClientBuilder(RetryStrategyWithContent<O> retryStrategyWithContent)
Creates a new builder with the specified
RetryStrategyWithContent. |
| Modifier and Type | Method and Description |
|---|---|
RetryingClientBuilder<O> |
maxTotalAttempts(int maxTotalAttempts)
Sets the maximum number of total attempts.
|
RetryingClientBuilder<O> |
responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
Sets the response timeout for each attempt.
|
RetryingClientBuilder<O> |
responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
Sets the response timeout for each attempt in milliseconds.
|
String |
toString() |
protected RetryingClientBuilder(RetryStrategy retryStrategy)
RetryStrategy.protected RetryingClientBuilder(RetryStrategyWithContent<O> retryStrategyWithContent)
RetryStrategyWithContent.public RetryingClientBuilder<O> maxTotalAttempts(int maxTotalAttempts)
Flags.defaultMaxTotalAttempts() will be used.this to support method chaining.public RetryingClientBuilder<O> responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
RetryingClient 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.this to support method chaining.public RetryingClientBuilder<O> responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
RetryingClient are made,
corresponding responses are timed out by this value. 0 disables the timeout.this to support method chaining.Copyright © 2020 LeanCloud. All rights reserved.