Skip to content

Commit a499f37

Browse files
committed
Updaet RetryPolicy.withMaxDuration to mention Timeout policy.
1 parent 2a867fa commit a499f37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/net/jodah/failsafe/RetryPolicy.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,10 @@ public RetryPolicy<R> withMaxAttempts(int maxAttempts) {
501501

502502
/**
503503
* Sets the max duration to perform retries for, else the execution will be failed.
504+
* <p>
505+
* Note: This setting will not cause long running executions to be interrupted. For that capability, use a {@link
506+
* Timeout} policy {@link Timeout#withCancel(boolean) withCancel} set to {@code true}.
507+
* </p>
504508
*
505509
* @throws NullPointerException if {@code maxDuration} is null
506510
* @throws IllegalStateException if {@code maxDuration} is <= the {@link RetryPolicy#withDelay(Duration) delay}

0 commit comments

Comments
 (0)