Class HttpRetryOptions.Builder
- Enclosing class:
- HttpRetryOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract HttpRetryOptions.BuilderSetter for attempts.abstract HttpRetryOptionsbuild()abstract HttpRetryOptions.BuilderSetter for expBase.httpStatusCodes(Integer... httpStatusCodes) Setter for httpStatusCodes.abstract HttpRetryOptions.BuilderhttpStatusCodes(List<Integer> httpStatusCodes) Setter for httpStatusCodes.abstract HttpRetryOptions.BuilderinitialDelay(Double initialDelay) Setter for initialDelay.abstract HttpRetryOptions.BuilderSetter for jitter.abstract HttpRetryOptions.BuilderSetter for maxDelay.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
attempts
Setter for attempts.attempts: Maximum number of attempts, including the original request. If 0 or 1, it means no retries. If not specified, default to 5.
-
initialDelay
Setter for initialDelay.initialDelay: Initial delay before the first retry, in fractions of a second. If not specified, default to 1.0 second.
-
maxDelay
Setter for maxDelay.maxDelay: Maximum delay between retries, in fractions of a second. If not specified, default to 60.0 seconds.
-
expBase
Setter for expBase.expBase: Multiplier by which the delay increases after each attempt. If not specified, default to 2.0.
-
jitter
Setter for jitter.jitter: Randomness factor for the delay. If not specified, default to 1.0.
-
httpStatusCodes
Setter for httpStatusCodes.httpStatusCodes: List of HTTP status codes that should trigger a retry. If not specified, a default set of retryable codes (408, 429, and 5xx) may be used.
-
httpStatusCodes
Setter for httpStatusCodes.httpStatusCodes: List of HTTP status codes that should trigger a retry. If not specified, a default set of retryable codes (408, 429, and 5xx) may be used.
-
build
-