Interface PrioritizedEsThreadPoolExecutor.StarvationWatcher
- Enclosing class:
- PrioritizedEsThreadPoolExecutor
public static interface PrioritizedEsThreadPoolExecutor.StarvationWatcher
We expect the work queue to be empty fairly frequently; if the queue remains nonempty for sufficiently long then there's a risk that
some lower-priority tasks are being starved of access to the executor. Implementations of this interface are notified whether the
work queue is empty or not before and after execution of each task, so that we can warn the user of this possible starvation.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called before and after the execution of each task if the queue is empty (excluding the task being executed)void
Called after the execution of each task if the queue is nonempty (excluding the task being executed)
-
Field Details
-
NOOP_STARVATION_WATCHER
-
-
Method Details
-
onEmptyQueue
void onEmptyQueue()Called before and after the execution of each task if the queue is empty (excluding the task being executed) -
onNonemptyQueue
void onNonemptyQueue()Called after the execution of each task if the queue is nonempty (excluding the task being executed)
-