Interface SynchronizerApi.Get.SleepInvoke<T>
-
- All Superinterfaces:
SynchronizerApi.Base.SleepInvoke,SynchronizerApi.Fluent,SynchronizerApi.Get.Invoke<T>
- All Known Subinterfaces:
SynchronizerApi.Get.WakeSleepInvoke<T>
- Enclosing interface:
- SynchronizerApi.Get
public static interface SynchronizerApi.Get.SleepInvoke<T> extends SynchronizerApi.Get.Invoke<T>, SynchronizerApi.Base.SleepInvoke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default SynchronizerApi.Get.Invoke<T>thenSleepUntil(BooleanSupplier state)Adds sleeping to the action chain.SynchronizerApi.Get.Invoke<T>thenSleepUntil(BooleanSupplier state, Duration timeout)Adds sleeping to the action chain.-
Methods inherited from interface com.github.mizool.core.concurrent.SynchronizerApi.Get.Invoke
invoke
-
-
-
-
Method Detail
-
thenSleepUntil
default SynchronizerApi.Get.Invoke<T> thenSleepUntil(BooleanSupplier state)
Description copied from interface:SynchronizerApi.Base.SleepInvokeAdds sleeping to the action chain.
When performing this action, the chain will ensure the given condition is met before returning. If the supplier returnsfalse, this action chain sleeps until another chain wakes it up. Then, the supplier is called again and if it still returnsfalse, the chain resumes sleeping. Otherwise, the chain invocation finishes.- Specified by:
thenSleepUntilin interfaceSynchronizerApi.Base.SleepInvoke- Parameters:
state- the supplier that returnstrueif the action chain should finish,falseotherwise.
-
thenSleepUntil
SynchronizerApi.Get.Invoke<T> thenSleepUntil(BooleanSupplier state, Duration timeout)
Description copied from interface:SynchronizerApi.Base.SleepInvokeAdds sleeping to the action chain.
When performing this action, the chain will ensure the given condition is met before returning. If the supplier returnsfalse, this action chain sleeps until either another chain wakes it up or the timeout has passed. Then, the supplier is called again and if it still returnsfalse, the chain resumes sleeping. Otherwise, the chain invocation finishes.- Specified by:
thenSleepUntilin interfaceSynchronizerApi.Base.SleepInvoke- Parameters:
state- the supplier that returnstrueif the action chain should finish,falseotherwise.timeout- the maximum amount of time to sleep before re-checking the condition, ornullto sleep indefinitely.
-
-