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 |
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 ThreadPoolProbe
threadPool
- the AbstractThreadPool
being monitoredpublic void onThreadPoolStopEvent(AbstractThreadPool threadPool)
This event may be fired when an AbstractThreadPool
implementation
stops.
onThreadPoolStopEvent
in interface ThreadPoolProbe
threadPool
- 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 ThreadPoolProbe
threadPool
- 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 ThreadPoolProbe
threadPool
- the AbstractThreadPool
being monitoredthread
- the thread that is no longer being managed by the
AbstractThreadPool
public 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 ThreadPoolProbe
threadPool
- the AbstractThreadPool
being monitoredmaxNumberOfThreads
- the maximum number of threads allowed in the
AbstractThreadPool
public void onTaskQueueEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a task has been queued for processing.
onTaskQueueEvent
in interface ThreadPoolProbe
threadPool
- 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 ThreadPoolProbe
threadPool
- the AbstractThreadPool
being monitoredtask
- a unit of work that is about to be processed.public void onTaskCompleteEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a dequeued task has completed processing.
onTaskCompleteEvent
in interface ThreadPoolProbe
threadPool
- 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 ThreadPoolProbe
threadPool
- the AbstractThreadPool
being monitoredCopyright © 2015 Oracle Corporation. All rights reserved.