Skip to content

Commit 00f3245

Browse files
committed
Change approach how to reschedule event for backwards compatible purposes
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 793a56d commit 00f3245

File tree

9 files changed

+78
-453
lines changed

9 files changed

+78
-453
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/AbstractUpdateControl.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/BaseControl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
public abstract class BaseControl<T extends BaseControl<T>> {
2323

24+
public static final Long INSTANT_RESCHEDULE = 0L;
25+
2426
private Long scheduleDelay = null;
2527

2628
public T rescheduleAfter(long delay) {
@@ -37,6 +39,11 @@ public T rescheduleAfter(long delay, TimeUnit timeUnit) {
3739
return rescheduleAfter(timeUnit.toMillis(delay));
3840
}
3941

42+
public T reschedule() {
43+
this.scheduleDelay = INSTANT_RESCHEDULE;
44+
return (T) this;
45+
}
46+
4047
public Optional<Long> getScheduleDelay() {
4148
return Optional.ofNullable(scheduleDelay);
4249
}

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/ErrorStatusUpdateControl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import io.fabric8.kubernetes.api.model.HasMetadata;
2222

2323
public class ErrorStatusUpdateControl<P extends HasMetadata>
24-
extends AbstractUpdateControl<ErrorStatusUpdateControl<P>> {
24+
extends BaseControl<ErrorStatusUpdateControl<P>> {
2525

2626
private final P resource;
2727
private boolean noRetry = false;

0 commit comments

Comments
 (0)