Class HttpRetryOptions.Builder
- Enclosing class:
- HttpRetryOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract HttpRetryOptions.BuilderSetter for attempts.abstract HttpRetryOptionsbuild()Clears the value of attempts field.Clears the value of expBase field.Clears the value of httpStatusCodes field.Clears the value of initialDelay field.Clears the value of jitter field.Clears the value of maxDelay field.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.
-
clearAttempts
Clears the value of attempts field. -
initialDelay
Setter for initialDelay.initialDelay: Initial delay before the first retry, in fractions of a second. If not specified, default to 1.0 second.
-
clearInitialDelay
Clears the value of initialDelay field. -
maxDelay
Setter for maxDelay.maxDelay: Maximum delay between retries, in fractions of a second. If not specified, default to 60.0 seconds.
-
clearMaxDelay
Clears the value of maxDelay field. -
expBase
Setter for expBase.expBase: Multiplier by which the delay increases after each attempt. If not specified, default to 2.0.
-
clearExpBase
Clears the value of expBase field. -
jitter
Setter for jitter.jitter: Randomness factor for the delay. If not specified, default to 1.0.
-
clearJitter
Clears the value of jitter field. -
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.
-
clearHttpStatusCodes
Clears the value of httpStatusCodes field. -
build
-