Package software.amazon.awssdk.crt.io
Class ExponentialBackoffRetryOptions
java.lang.Object
software.amazon.awssdk.crt.io.ExponentialBackoffRetryOptions
Configuration options for the exponential backoff retry strategy for http requests
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat kind of jitter or randomization to apply to the backoff time interval https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongwithBackoffScaleFactorMS(long backoffScaleFactorMS) Configures the initial (base) unscaled backoff interval in millisecondswithEventLoopGroup(EventLoopGroup eventLoopGroup) Configure the event loop group to use to schedule the backoff/retry tasksConfigure the type of jitter to apply to the backoff interval calculationswithMaxRetries(long maxRetries) Configure the maximum number of retries to make while using a strategy sourced from these options
-
Constructor Details
-
ExponentialBackoffRetryOptions
public ExponentialBackoffRetryOptions()Default constructor
-
-
Method Details
-
withEventLoopGroup
Configure the event loop group to use to schedule the backoff/retry tasks- Parameters:
eventLoopGroup- event loop group to use- Returns:
- this options object
-
getEventLoopGroup
- Returns:
- The event loop group currently configured to do backoff/retry
-
withMaxRetries
Configure the maximum number of retries to make while using a strategy sourced from these options- Parameters:
maxRetries- maximum number of retries- Returns:
- this options object
-
getMaxRetries
public long getMaxRetries()- Returns:
- the maximum number of retries to make while using a strategy sourced from these options
-
withBackoffScaleFactorMS
Configures the initial (base) unscaled backoff interval in milliseconds- Parameters:
backoffScaleFactorMS- the initial (base) unscaled backoff interval in milliseconds- Returns:
- this options object
-
getBackoffScaleFactorMS
public long getBackoffScaleFactorMS()- Returns:
- the initial (base) unscaled backoff interval in milliseconds while using a strategy sourced from these options
-
withJitterMode
public ExponentialBackoffRetryOptions withJitterMode(ExponentialBackoffRetryOptions.JitterMode jitterMode) Configure the type of jitter to apply to the backoff interval calculations- Parameters:
jitterMode- the type of jitter to apply to the backoff interval calculations- Returns:
- this options object
-
getJitterMode
- Returns:
- the type of jitter to apply to the backoff interval calculations while using a strategy sourced from these options
-