public static class ThreadPoolProbe.Adapter extends Object implements ThreadPoolProbe
ThreadPoolProbe adapter that provides no-op implementations for
all interface methods allowing easy extension by the developer.ThreadPoolProbe.Adapter| Constructor and Description |
|---|
Adapter() |
| 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. |
public void onThreadPoolStartEvent(AbstractThreadPool threadPool)
This event may be fired when an AbstractThreadPool implementation
starts running.
onThreadPoolStartEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredpublic void onThreadPoolStopEvent(AbstractThreadPool threadPool)
This event may be fired when an AbstractThreadPool implementation
stops.
onThreadPoolStopEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredpublic void onThreadAllocateEvent(AbstractThreadPool threadPool, Thread thread)
This event may be fired when an AbstractThreadPool implementation
allocates a new managed Thread.
onThreadAllocateEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredthread - the thread that has been allocatedpublic void onThreadReleaseEvent(AbstractThreadPool threadPool, Thread thread)
This event may be fired when a thread will no longer be managed by the
AbstractThreadPool implementation.
onThreadReleaseEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredthread - the thread that is no longer being managed by the
AbstractThreadPoolpublic 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.
onMaxNumberOfThreadsEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredmaxNumberOfThreads - the maximum number of threads allowed in the
AbstractThreadPoolpublic void onTaskQueueEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a task has been queued for processing.
onTaskQueueEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredtask - a unit of work to be processedpublic 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.
onTaskDequeueEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredtask - a unit of work that is about to be processed.public 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.onTaskCancelEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredtask - a unit of work that has been canceledpublic void onTaskCompleteEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a dequeued task has completed processing.
onTaskCompleteEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredtask - the unit of work that has completed processingpublic void onTaskQueueOverflowEvent(AbstractThreadPool threadPool)
This event may be fired when the task queue of the AbstractThreadPool
implementation has exceeded its configured size.
onTaskQueueOverflowEvent in interface ThreadPoolProbethreadPool - the AbstractThreadPool being monitoredCopyright © 2017–2019 Oracle Corporation. All rights reserved.