Skip to content

Commit 14eb36f

Browse files
authored
improve: add setMaxInterval(Duration) for GenericRetry (#3297)
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent a98f494 commit 14eb36f

File tree

1 file changed

+4
-0
lines changed
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry

1 file changed

+4
-0
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry/GenericRetry.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ public GenericRetry setMaxInterval(long maxInterval) {
9090
return this;
9191
}
9292

93+
public GenericRetry setMaxInterval(Duration maxInterval) {
94+
return setMaxInterval(maxInterval.toMillis());
95+
}
96+
9397
public GenericRetry withoutMaxInterval() {
9498
this.maxInterval = -1;
9599
return this;

0 commit comments

Comments
 (0)