Package org.omegazero.common.event
Class TaskQueueExecutor.Handle
java.lang.Object
org.omegazero.common.event.TaskQueueExecutor.Handle
- Enclosing class:
TaskQueueExecutor
An opaque class used for task execution control. See
TaskQueueExecutor.newHandle().- Since:
- 2.9
-
Method Summary
Modifier and TypeMethodDescriptionbooleanEquivalent toAbstractTaskQueueExecutor.queue(Method, Object, int, Object...), but queued with this handle.booleanEquivalent toAbstractTaskQueueExecutor.queue(Runnable, int), but queued with this handle.booleanEquivalent toAbstractTaskQueueExecutor.queue(Consumer, int, Object...), but queued with this handle.booleanQueues the givenTaskwith this handle.
-
Method Details
-
queue
- Parameters:
task- The task to queue- Returns:
trueif the task was successfully queued
-
queue
Equivalent toAbstractTaskQueueExecutor.queue(Method, Object, int, Object...), but queued with this handle.- Parameters:
method- The task handler methodcallerInstance- The instance to call the method withpriority- The priority of this taskargs- The arguments to pass to the task handler when this task is executed- Returns:
trueif the task was successfully queued
-
queue
Equivalent toAbstractTaskQueueExecutor.queue(Runnable, int), but queued with this handle.- Parameters:
handler- The task handlerpriority- The priority of this task- Returns:
trueif the task was successfully queued
-
queue
Equivalent toAbstractTaskQueueExecutor.queue(Consumer, int, Object...), but queued with this handle.- Parameters:
handler- The task handlerpriority- The priority of this taskargs- The arguments to pass to the task handler when this task is executed- Returns:
trueif the task was successfully queued
-