mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-02 04:09:01 +00:00
Document behavior for 0 delay combined with jitter
Closes gh-36946
This commit is contained in:
@@ -281,6 +281,11 @@ public interface RetryPolicy {
|
||||
* {@linkplain #maxDelay(Duration) max delay}.
|
||||
* <p>If a {@linkplain #multiplier(double) multiplier} is specified, it
|
||||
* is applied to the jitter value as well.
|
||||
* <p>When the configured {@linkplain #delay(Duration) delay} is zero
|
||||
* combined with a positive jitter, the delay never grows regardless of
|
||||
* any configured multiplier, so the full configured jitter is applied
|
||||
* directly as a random delay in the range from zero to
|
||||
* {@code min(jitter, maxDelay)}.
|
||||
* <p>The default is no jitter.
|
||||
* <p>The supplied value will override any previously configured value.
|
||||
* <p>You should not specify this configuration option if you have
|
||||
|
||||
@@ -154,6 +154,10 @@ public class ExponentialBackOff implements BackOff {
|
||||
* {@code initialInterval} or above {@code maxInterval}.
|
||||
* <p>If a {@code multiplier} is specified, it is applied to the jitter value
|
||||
* as well.
|
||||
* <p>When {@code initialInterval} is {@code 0} combined with a positive
|
||||
* jitter, the interval never grows regardless of any configured multiplier,
|
||||
* so the full configured jitter is applied directly as a random interval in
|
||||
* the range from {@code 0} to {@code min(jitter, maxInterval)}.
|
||||
* @param jitter the jitter value in milliseconds
|
||||
* @since 7.0
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user