echauchot commented on code in PR #22985:
URL: https://github.com/apache/flink/pull/22985#discussion_r1307486764
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/Executing.java:
##########
@@ -210,6 +265,15 @@ interface Context
* @return a ScheduledFuture representing pending completion of the
task
*/
ScheduledFuture<?> runIfState(State expectedState, Runnable action,
Duration delay);
+
+ /**
+ * Runs the given action immediately or after a delay depending on the
given condition.
+ *
+ * @param condition if met, the action is executed immediately or
scheduled otherwise
+ * @param action action to run
+ * @param delay delay after which to run the action if the condition
is not met
+ */
+ void runIfConditionOrSchedule(boolean condition, Runnable action,
Duration delay);
Review Comment:
Agree, thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]