public abstract class AbstractRetryingClientBuilder<O extends Response> extends Object
AbstractRetryingClient or its decorator function.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRetryingClientBuilder(RetryStrategy retryStrategy)
Creates a new builder with the specified
RetryStrategy. |
protected |
AbstractRetryingClientBuilder(RetryStrategyWithContent<O> retryStrategyWithContent)
Creates a new builder with the specified
RetryStrategyWithContent. |
| Modifier and Type | Method and Description |
|---|---|
AbstractRetryingClientBuilder<O> |
maxTotalAttempts(int maxTotalAttempts)
Sets the maximum number of total attempts.
|
AbstractRetryingClientBuilder<O> |
responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
Sets the response timeout for each attempt.
|
AbstractRetryingClientBuilder<O> |
responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
Sets the response timeout for each attempt in milliseconds.
|
String |
toString() |
protected AbstractRetryingClientBuilder(RetryStrategy retryStrategy)
RetryStrategy.protected AbstractRetryingClientBuilder(RetryStrategyWithContent<O> retryStrategyWithContent)
RetryStrategyWithContent.public AbstractRetryingClientBuilder<O> maxTotalAttempts(int maxTotalAttempts)
Flags.defaultMaxTotalAttempts() will be used.this to support method chaining.public AbstractRetryingClientBuilder<O> responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
AbstractRetryingClient 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 AbstractRetryingClientBuilder<O> responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
AbstractRetryingClient 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.