Add constant for default timeout value

Closes gh-36983
This commit is contained in:
Juergen Hoeller
2026-07-06 11:57:27 +02:00
parent f0e69a702c
commit 97e9ddb2d7
@@ -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;