public interface ThreadPoolProbe
AbstractThreadPool implementations.| Modifier and Type | Interface and Description |
|---|---|
static class |
ThreadPoolProbe.Adapter
ThreadPoolProbe adapter that provides no-op implementations for
all interface methods allowing easy extension by the developer. |
| Modifier and Type | Method and Description |
|---|---|
void |
onMaxNumberOfThreadsEvent(AbstractThreadPool threadPool,
int maxNumberOfThreads)
This event may be fired when the
AbstractThreadPool implementation
has allocated and is managing a number of threads equal to the maximum limit
of the pool. |
void |
onTaskCancelEvent(AbstractThreadPool threadPool,
Runnable task)
This event may be fired when a dequeued task has been canceled.
|
void |
onTaskCompleteEvent(AbstractThreadPool threadPool,
Runnable task)
This event may be fired when a dequeued task has completed processing.
|
void |
onTaskDequeueEvent(AbstractThreadPool threadPool,
Runnable task)
This event may be fired when a task has been pulled from the queue and
is about to be processed.
|
void |
onTaskQueueEvent(AbstractThreadPool threadPool,
Runnable task)
This event may be fired when a task has been queued for processing.
|
void |
onTaskQueueOverflowEvent(AbstractThreadPool threadPool)
This event may be fired when the task queue of the
AbstractThreadPool
implementation has exceeded its configured size. |
void |
onThreadAllocateEvent(AbstractThreadPool threadPool,
Thread thread)
This event may be fired when an
AbstractThreadPool implementation
allocates a new managed Thread. |
void |
onThreadPoolStartEvent(AbstractThreadPool threadPool)
This event may be fired when an
AbstractThreadPool implementation
starts running. |
void |
onThreadPoolStopEvent(AbstractThreadPool threadPool)
This event may be fired when an
AbstractThreadPool implementation
stops. |
void |
onThreadReleaseEvent(AbstractThreadPool threadPool,
Thread thread)
This event may be fired when a thread will no longer be managed by the
AbstractThreadPool implementation. |
void onThreadPoolStartEvent(AbstractThreadPool threadPool)
This event may be fired when an AbstractThreadPool implementation
starts running.
threadPool - the AbstractThreadPool being monitoredvoid onThreadPoolStopEvent(AbstractThreadPool threadPool)
This event may be fired when an AbstractThreadPool implementation
stops.
threadPool - the AbstractThreadPool being monitoredvoid onThreadAllocateEvent(AbstractThreadPool threadPool, Thread thread)
This event may be fired when an AbstractThreadPool implementation
allocates a new managed Thread.
threadPool - the AbstractThreadPool being monitoredthread - the thread that has been allocatedvoid onThreadReleaseEvent(AbstractThreadPool threadPool, Thread thread)
This event may be fired when a thread will no longer be managed by the
AbstractThreadPool implementation.
threadPool - the AbstractThreadPool being monitoredthread - the thread that is no longer being managed by the
AbstractThreadPoolvoid onMaxNumberOfThreadsEvent(AbstractThreadPool threadPool, int maxNumberOfThreads)
This event may be fired when the AbstractThreadPool implementation
has allocated and is managing a number of threads equal to the maximum limit
of the pool.
threadPool - the AbstractThreadPool being monitoredmaxNumberOfThreads - the maximum number of threads allowed in the
AbstractThreadPoolvoid onTaskQueueEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a task has been queued for processing.
threadPool - the AbstractThreadPool being monitoredtask - a unit of work to be processedvoid onTaskDequeueEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a task has been pulled from the queue and is about to be processed.
threadPool - the AbstractThreadPool being monitoredtask - a unit of work that is about to be processed.void onTaskCancelEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a dequeued task has been canceled.
This event can occur during shutdownNow() invocation, where tasks are getting pulled out of thread pool queue and returned as the result of shutdownNow() method call.threadPool - the AbstractThreadPool being monitoredtask - a unit of work that has been canceledvoid onTaskCompleteEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a dequeued task has completed processing.
threadPool - the AbstractThreadPool being monitoredtask - the unit of work that has completed processingvoid onTaskQueueOverflowEvent(AbstractThreadPool threadPool)
This event may be fired when the task queue of the AbstractThreadPool
implementation has exceeded its configured size.
threadPool - the AbstractThreadPool being monitoredCopyright © 2016 Oracle Corporation. All Rights Reserved.