Interface RetryConfig
- All Known Subinterfaces:
RetryConfig.BuildableRetryConfig
public interface RetryConfig
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionWithout mitigation, very frequently started retry-loops running against highly contended resources can result in some retry-loops invocations never making any progress and eventually time out.Initial lower bound for a retry-sleep duration for the retry-loop, defaults toDEFAULT_RETRY_INITIAL_SLEEP_LOWER.Initial upper bound for a retry-sleep duration for the retry-loop, defaults toDEFAULT_RETRY_INITIAL_SLEEP_UPPER.maxSleep()Maximum retry-sleep duration, defaults toDEFAULT_RETRY_MAX_SLEEP.intretries()Maximum number of allowed retries, defaults to "10000".timeout()Maximum allowed time until a retry-loop and commits fails with aRetryTimeoutException, defaults to "PT15S".
-
Field Details
-
DEFAULT_RETRY_CONFIG
-
DEFAULT_TIMEOUT
- See Also:
-
DEFAULT_RETRIES
- See Also:
-
DEFAULT_RETRY_INITIAL_SLEEP_LOWER
- See Also:
-
DEFAULT_RETRY_INITIAL_SLEEP_UPPER
- See Also:
-
DEFAULT_RETRY_MAX_SLEEP
- See Also:
-
-
Method Details
-
timeout
Maximum allowed time until a retry-loop and commits fails with aRetryTimeoutException, defaults to "PT15S". -
retries
@WithDefault("10000") int retries()Maximum number of allowed retries, defaults to "10000". -
initialSleepLower
Initial lower bound for a retry-sleep duration for the retry-loop, defaults toDEFAULT_RETRY_INITIAL_SLEEP_LOWER. This value will be doubled after each retry, as long asmaxSleep()is not exceeded. A concrete sleep duration will be randomly chosen between the current lower and upper bounds. -
initialSleepUpper
Initial upper bound for a retry-sleep duration for the retry-loop, defaults toDEFAULT_RETRY_INITIAL_SLEEP_UPPER. This value will be doubled after each retry, as long asmaxSleep()is not exceeded. A concrete sleep duration will be randomly chosen between the current lower and upper bounds. -
maxSleep
Maximum retry-sleep duration, defaults toDEFAULT_RETRY_MAX_SLEEP. -
fairRetries
Without mitigation, very frequently started retry-loops running against highly contended resources can result in some retry-loops invocations never making any progress and eventually time out.The default "fair retries type" helps in these scenarios with sacrificing the overall throughput too much.
-