Package software.amazon.awssdk.crt.io
Class ExponentialBackoffRetryOptions
- java.lang.Object
-
- software.amazon.awssdk.crt.io.ExponentialBackoffRetryOptions
-
public class ExponentialBackoffRetryOptions extends Object
Configuration options for the exponential backoff retry strategy for http requests
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExponentialBackoffRetryOptions.JitterMode
What 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 Constructor Description ExponentialBackoffRetryOptions()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getBackoffScaleFactorMS()
EventLoopGroup
getEventLoopGroup()
ExponentialBackoffRetryOptions.JitterMode
getJitterMode()
long
getMaxRetries()
ExponentialBackoffRetryOptions
withBackoffScaleFactorMS(long backoffScaleFactorMS)
Configures the initial (base) unscaled backoff interval in millisecondsExponentialBackoffRetryOptions
withEventLoopGroup(EventLoopGroup eventLoopGroup)
Configure the event loop group to use to schedule the backoff/retry tasksExponentialBackoffRetryOptions
withJitterMode(ExponentialBackoffRetryOptions.JitterMode jitterMode)
Configure the type of jitter to apply to the backoff interval calculationsExponentialBackoffRetryOptions
withMaxRetries(long maxRetries)
Configure the maximum number of retries to make while using a strategy sourced from these options
-
-
-
Method Detail
-
withEventLoopGroup
public ExponentialBackoffRetryOptions withEventLoopGroup(EventLoopGroup eventLoopGroup)
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
public EventLoopGroup getEventLoopGroup()
- Returns:
- The event loop group currently configured to do backoff/retry
-
withMaxRetries
public ExponentialBackoffRetryOptions withMaxRetries(long maxRetries)
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
public ExponentialBackoffRetryOptions withBackoffScaleFactorMS(long backoffScaleFactorMS)
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
public ExponentialBackoffRetryOptions.JitterMode getJitterMode()
- Returns:
- the type of jitter to apply to the backoff interval calculations while using a strategy sourced from these options
-
-