mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Add constant for default timeout value
Closes gh-36983
This commit is contained in:
@@ -67,7 +67,7 @@ public interface RetryPolicy {
|
||||
* @see Builder#timeout(Duration)
|
||||
*/
|
||||
default Duration getTimeout() {
|
||||
return Duration.ZERO;
|
||||
return Builder.DEFAULT_TIMEOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,6 +157,11 @@ public interface RetryPolicy {
|
||||
*/
|
||||
public static final long DEFAULT_DELAY = 1000;
|
||||
|
||||
/**
|
||||
* The default {@linkplain #multiplier(double) multiplier}: {@value}.
|
||||
*/
|
||||
public static final double DEFAULT_MULTIPLIER = 1.0;
|
||||
|
||||
/**
|
||||
* The default {@linkplain #maxDelay(Duration) max delay}: {@value} ms.
|
||||
* @see Long#MAX_VALUE
|
||||
@@ -164,9 +169,11 @@ public interface RetryPolicy {
|
||||
public static final long DEFAULT_MAX_DELAY = Long.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* The default {@linkplain #multiplier(double) multiplier}: {@value}.
|
||||
* The default {@linkplain #timeout(Duration) timeout}: {@value}.
|
||||
* @since 7.0.9
|
||||
* @see Duration#ZERO
|
||||
*/
|
||||
public static final double DEFAULT_MULTIPLIER = 1.0;
|
||||
public static final Duration DEFAULT_TIMEOUT = Duration.ZERO;
|
||||
|
||||
|
||||
private @Nullable BackOff backOff;
|
||||
|
||||
Reference in New Issue
Block a user