Package org.openrewrite.scheduling
Class WatchableExecutionContext
java.lang.Object
org.openrewrite.scheduling.WatchableExecutionContext
- All Implemented Interfaces:
ExecutionContext
-
Field Summary
Fields inherited from interface org.openrewrite.ExecutionContext
CURRENT_RECIPE, DATA_TABLES, PARENT_RECIPE, UNCAUGHT_EXCEPTION_COUNT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetMessage(String key) getRunTimeout(int inputs) boolean<T> TpollMessage(String key) voidputMessage(String key, @Nullable Object value) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.ExecutionContext
addObserver, computeMessage, getMessage, getObservers, getParentRecipe, incrementAndGetUncaughtExceptionCount, pollMessage, putCurrentRecipe, putMessageInCollection, putMessageInSet, putParentRecipe
-
Constructor Details
-
WatchableExecutionContext
public WatchableExecutionContext()
-
-
Method Details
-
hasNewMessages
public boolean hasNewMessages() -
resetHasNewMessages
public void resetHasNewMessages() -
putMessage
- Specified by:
putMessagein interfaceExecutionContext
-
getMessage
- Specified by:
getMessagein interfaceExecutionContext
-
pollMessage
- Specified by:
pollMessagein interfaceExecutionContext
-
getOnError
- Specified by:
getOnErrorin interfaceExecutionContext
-
getOnTimeout
- Specified by:
getOnTimeoutin interfaceExecutionContext
-
getRunTimeout
- Specified by:
getRunTimeoutin interfaceExecutionContext- Parameters:
inputs- The number of inputs to the run. Allows the duration to be scaled to the number of inputs.- Returns:
- The maximum duration a run (e.g. parse operation, recipe run) can take.
-