From e51d0f109ae2b8a661b19840869302ba36e5cfe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Thu, 16 Apr 2026 10:10:13 +0200 Subject: [PATCH] improve: add setMaxInterval(Duration) for GenericRetry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../operator/processing/retry/GenericRetry.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry/GenericRetry.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry/GenericRetry.java index 36972f0ddd..5ee016b34f 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry/GenericRetry.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry/GenericRetry.java @@ -90,6 +90,10 @@ public GenericRetry setMaxInterval(long maxInterval) { return this; } + public GenericRetry setMaxInterval(Duration maxInterval) { + return setMaxInterval(maxInterval.toMillis()); + } + public GenericRetry withoutMaxInterval() { this.maxInterval = -1; return this;