-
public interface QueueStatusListenerObserves the state of tasks in TaskQueue.
All methods are invoked on a background thread; do not block — listener latency is added to task execution time. The interface is internal and intended for debug / metrics use only.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonTaskAdded(Task<?> task)Called when a new task is added to the queue, or a failed task is re-added for retry. abstract UnitonTaskStarted(Task<?> task)Called when the task started execution on the queue executor. abstract UnitonTaskFinished(Task<?> task, QueueResult result)Called when the task completed execution — successfully or not (moving back to pending state). abstract UnitonTaskDropped(Task<?> task)Called when the task is removed from the queue because of reaching the pendingTasksLimit. -
-
Method Detail
-
onTaskAdded
@WorkerThread() abstract Unit onTaskAdded(Task<?> task)
Called when a new task is added to the queue, or a failed task is re-added for retry.
-
onTaskStarted
@WorkerThread() abstract Unit onTaskStarted(Task<?> task)
Called when the task started execution on the queue executor.
-
onTaskFinished
@WorkerThread() abstract Unit onTaskFinished(Task<?> task, QueueResult result)
Called when the task completed execution — successfully or not (moving back to pending state).
-
onTaskDropped
@WorkerThread() abstract Unit onTaskDropped(Task<?> task)
Called when the task is removed from the queue because of reaching the pendingTasksLimit.
-
-
-
-