Skip to content

Commit ca2e47e

Browse files
committed
wip
Signed-off-by: Attila Mészáros <[email protected]>
1 parent d469b27 commit ca2e47e

File tree

1 file changed

+24
-0
lines changed
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler

1 file changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,44 @@ public abstract class BaseControl<T extends BaseControl<T>> {
2525

2626
private Long scheduleDelay = null;
2727

28+
/**
29+
* Schedules a reconciliation to occur after the specified delay in milliseconds.
30+
*
31+
* @param delay the delay in milliseconds after which to reschedule
32+
* @return this control instance for fluent chaining
33+
*/
2834
public T rescheduleAfter(long delay) {
2935
rescheduleAfter(Duration.ofMillis(delay));
3036
return (T) this;
3137
}
3238

39+
/**
40+
* Schedules a reconciliation to occur after the specified delay.
41+
*
42+
* @param delay the {@link Duration} after which to reschedule
43+
* @return this control instance for fluent chaining
44+
*/
3345
public T rescheduleAfter(Duration delay) {
3446
this.scheduleDelay = delay.toMillis();
3547
return (T) this;
3648
}
3749

50+
/**
51+
* Schedules a reconciliation to occur after the specified delay using the given time unit.
52+
*
53+
* @param delay the delay value
54+
* @param timeUnit the time unit of the delay
55+
* @return this control instance for fluent chaining
56+
*/
3857
public T rescheduleAfter(long delay, TimeUnit timeUnit) {
3958
return rescheduleAfter(timeUnit.toMillis(delay));
4059
}
4160

61+
/**
62+
* Schedules an instant reconciliation. The reconciliation will be triggered as soon as possible.
63+
*
64+
* @return this control instance for fluent chaining
65+
*/
4266
public T reschedule() {
4367
this.scheduleDelay = INSTANT_RESCHEDULE;
4468
return (T) this;

0 commit comments

Comments
 (0)