@Nullable public FlowLogic<?> getCurrentTopLevel()
Return the outermost class FlowLogic
instance, or null if not in a flow.
class FlowLogic
@Suspendable @JvmStatic @JvmOverloads public void sleep(@NotNull java.time.Duration duration, boolean maySkipCheckpoint)
If on a flow, suspends the flow and only wakes it up after at least duration
time has passed. Otherwise,
just sleep for duration
. This sleep function is not designed to aid scheduling, for which you should
consider using interface SchedulableState
. It is designed to aid with managing contention
for which you have not managed via another means.
Warning: long sleeps and in general long running flows are highly discouraged, as there is currently no support for flow migration! This method will throw an exception if you attempt to sleep for longer than 5 minutes.
duration
,
duration
,
interface SchedulableState
@Suspendable @JvmStatic @JvmOverloads public void sleep(@NotNull java.time.Duration duration)
If on a flow, suspends the flow and only wakes it up after at least duration
time has passed. Otherwise,
just sleep for duration
. This sleep function is not designed to aid scheduling, for which you should
consider using interface SchedulableState
. It is designed to aid with managing contention
for which you have not managed via another means.
Warning: long sleeps and in general long running flows are highly discouraged, as there is currently no support for flow migration! This method will throw an exception if you attempt to sleep for longer than 5 minutes.
duration
,
duration
,
interface SchedulableState