Skip to content

Commit d5db98c

Browse files
committed
Add method to create initial policy
1 parent 91c7c82 commit d5db98c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/net/tascalate/concurrent/RetryPolicy.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ protected static final class PositiveVerdict implements Verdict {
8585
private final DelayPolicy<? super T> backoff;
8686
private final DelayPolicy<? super T> timeout;
8787

88+
public static <T> RetryPolicy<T> create() {
89+
return new RetryPolicy<>(-1);
90+
}
91+
8892
@SafeVarargs
8993
public final RetryPolicy<T> retryOn(Class<? extends Throwable>... retryOnThrowables) {
9094
return retryOn(Arrays.asList(retryOnThrowables));

0 commit comments

Comments
 (0)