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 TypeMethodDescriptionboolean
Equivalent toAbstractTaskQueueExecutor.queue(Method, Object, int, Object...)
, but queued with this handle.boolean
Equivalent toAbstractTaskQueueExecutor.queue(Runnable, int)
, but queued with this handle.boolean
Equivalent toAbstractTaskQueueExecutor.queue(Consumer, int, Object...)
, but queued with this handle.boolean
Queues the givenTask
with this handle.
-
Method Details
-
queue
- Parameters:
task
- The task to queue- Returns:
true
if 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 withargs
- The arguments to pass to the task handler when this task is executedpriority
- The priority of this task- Returns:
true
if 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:
true
if the task was successfully queued
-
queue
Equivalent toAbstractTaskQueueExecutor.queue(Consumer, int, Object...)
, but queued with this handle.- Parameters:
handler
- The task handlerargs
- The arguments to pass to the task handler when this task is executedpriority
- The priority of this task- Returns:
true
if the task was successfully queued
-