Class HttpRetryOptions.Builder
-
- All Implemented Interfaces:
public abstract class HttpRetryOptions.BuilderBuilder for HttpRetryOptions.
-
-
Constructor Summary
Constructors Constructor Description HttpRetryOptions.Builder()
-
Method Summary
Modifier and Type Method Description abstract HttpRetryOptions.Builderattempts(Integer attempts)Setter for attempts. HttpRetryOptions.BuilderclearAttempts()Clears the value of attempts field. abstract HttpRetryOptions.BuilderinitialDelay(Double initialDelay)Setter for initialDelay. HttpRetryOptions.BuilderclearInitialDelay()Clears the value of initialDelay field. abstract HttpRetryOptions.BuildermaxDelay(Double maxDelay)Setter for maxDelay. HttpRetryOptions.BuilderclearMaxDelay()Clears the value of maxDelay field. abstract HttpRetryOptions.BuilderexpBase(Double expBase)Setter for expBase. HttpRetryOptions.BuilderclearExpBase()Clears the value of expBase field. abstract HttpRetryOptions.Builderjitter(Double jitter)Setter for jitter. HttpRetryOptions.BuilderclearJitter()Clears the value of jitter field. abstract HttpRetryOptions.BuilderhttpStatusCodes(List<Integer> httpStatusCodes)Setter for httpStatusCodes. HttpRetryOptions.BuilderhttpStatusCodes(Array<Integer> httpStatusCodes)Setter for httpStatusCodes. HttpRetryOptions.BuilderclearHttpStatusCodes()Clears the value of httpStatusCodes field. abstract HttpRetryOptionsbuild()-
-
Method Detail
-
attempts
abstract HttpRetryOptions.Builder attempts(Integer 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
@CanIgnoreReturnValue() HttpRetryOptions.Builder clearAttempts()
Clears the value of attempts field.
-
initialDelay
abstract HttpRetryOptions.Builder initialDelay(Double 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
@CanIgnoreReturnValue() HttpRetryOptions.Builder clearInitialDelay()
Clears the value of initialDelay field.
-
maxDelay
abstract HttpRetryOptions.Builder maxDelay(Double maxDelay)
Setter for maxDelay.
maxDelay: Maximum delay between retries, in fractions of a second. If not specified, default to 60.0 seconds.
-
clearMaxDelay
@CanIgnoreReturnValue() HttpRetryOptions.Builder clearMaxDelay()
Clears the value of maxDelay field.
-
expBase
abstract HttpRetryOptions.Builder expBase(Double expBase)
Setter for expBase.
expBase: Multiplier by which the delay increases after each attempt. If not specified, default to 2.0.
-
clearExpBase
@CanIgnoreReturnValue() HttpRetryOptions.Builder clearExpBase()
Clears the value of expBase field.
-
jitter
abstract HttpRetryOptions.Builder jitter(Double jitter)
Setter for jitter.
jitter: Randomness factor for the delay. If not specified, default to 1.0.
-
clearJitter
@CanIgnoreReturnValue() HttpRetryOptions.Builder clearJitter()
Clears the value of jitter field.
-
httpStatusCodes
abstract HttpRetryOptions.Builder httpStatusCodes(List<Integer> 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
@CanIgnoreReturnValue() HttpRetryOptions.Builder httpStatusCodes(Array<Integer> 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
@CanIgnoreReturnValue() HttpRetryOptions.Builder clearHttpStatusCodes()
Clears the value of httpStatusCodes field.
-
build
abstract HttpRetryOptions build()
-
-
-
-