@Deprecated public class RetryingHttpClientBuilder extends RetryingClientBuilder
RetryingClient or its decorator function.| Constructor and Description |
|---|
RetryingHttpClientBuilder(RetryStrategy retryStrategy)
Deprecated.
|
RetryingHttpClientBuilder(RetryStrategyWithContent<HttpResponse> retryStrategyWithContent)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
RetryingHttpClientBuilder |
contentPreviewLength(int contentPreviewLength)
Deprecated.
Sets the length of content required to determine whether to retry or not.
|
RetryingHttpClientBuilder |
maxTotalAttempts(int maxTotalAttempts)
Deprecated.
Sets the maximum number of total attempts.
|
RetryingHttpClientBuilder |
responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
Deprecated.
Sets the response timeout for each attempt.
|
RetryingHttpClientBuilder |
responseTimeoutMillisForEachAttempt(long responseTimeoutMillisForEachAttempt)
Deprecated.
Sets the response timeout for each attempt in milliseconds.
|
RetryingHttpClientBuilder |
useRetryAfter(boolean useRetryAfter)
Deprecated.
Whether retry should be attempted according to the
retryHeader from the server or not. |
build, newDecorator, toString@Deprecated public RetryingHttpClientBuilder(RetryStrategy retryStrategy)
RetryingClient.builder(RetryStrategy).RetryStrategy.@Deprecated public RetryingHttpClientBuilder(RetryStrategyWithContent<HttpResponse> retryStrategyWithContent)
RetryingClient.builder(RetryStrategyWithContent).RetryStrategyWithContent.public RetryingHttpClientBuilder useRetryAfter(boolean useRetryAfter)
RetryingClientBuilderretryHeader from the server or not.
The web server may request a client to retry after specific time with retryAfter header.
If you want to follow the direction from the server not by your Backoff, invoke this method
with the useRetryAfter with true to request after the specified delay.useRetryAfter in class RetryingClientBuilderuseRetryAfter - true if you want to retry after using the retryAfter header.
false otherwiseRetryingClientBuilder to support method chainingpublic RetryingHttpClientBuilder contentPreviewLength(int contentPreviewLength)
RetryingClientBuilderRetryStrategyWithContent when calling
this builder's constructor. The default value of this property is
.contentPreviewLength in class RetryingClientBuildercontentPreviewLength - the content length to preview. 0 does not disable the length limit.RetryingClientBuilder to support method chainingpublic RetryingHttpClientBuilder maxTotalAttempts(int maxTotalAttempts)
AbstractRetryingClientBuilderFlags.defaultMaxTotalAttempts() will be used.maxTotalAttempts in class RetryingClientBuilderthis to support method chaining.public RetryingHttpClientBuilder 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 RetryingClientBuilderthis to support method chaining.public RetryingHttpClientBuilder responseTimeoutForEachAttempt(Duration responseTimeoutForEachAttempt)
AbstractRetryingClientBuilderAbstractRetryingClient are made,
corresponding responses are timed out by this value. 0 disables the timeout.responseTimeoutForEachAttempt in class RetryingClientBuilderthis to support method chaining.Copyright © 2020 LeanCloud. All rights reserved.