Class ThreadPoolProbe.Adapter
- java.lang.Object
-
- org.glassfish.grizzly.threadpool.ThreadPoolProbe.Adapter
-
- All Implemented Interfaces:
ThreadPoolProbe
- Enclosing interface:
- ThreadPoolProbe
public static class ThreadPoolProbe.Adapter extends Object implements ThreadPoolProbe
ThreadPoolProbeadapter that provides no-op implementations for all interface methods allowing easy extension by the developer.- Since:
- 2.1.9
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.grizzly.threadpool.ThreadPoolProbe
ThreadPoolProbe.Adapter
-
-
Constructor Summary
Constructors Constructor Description Adapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonMaxNumberOfThreadsEvent(AbstractThreadPool threadPool, int maxNumberOfThreads)This event may be fired when theAbstractThreadPoolimplementation has allocated and is managing a number of threads equal to the maximum limit of the pool.voidonTaskCancelEvent(AbstractThreadPool threadPool, Runnable task)This event may be fired when a dequeued task has been canceled.voidonTaskCompleteEvent(AbstractThreadPool threadPool, Runnable task)This event may be fired when a dequeued task has completed processing.voidonTaskDequeueEvent(AbstractThreadPool threadPool, Runnable task)This event may be fired when a task has been pulled from the queue and is about to be processed.voidonTaskQueueEvent(AbstractThreadPool threadPool, Runnable task)This event may be fired when a task has been queued for processing.voidonTaskQueueOverflowEvent(AbstractThreadPool threadPool)This event may be fired when the task queue of theAbstractThreadPoolimplementation has exceeded its configured size.voidonThreadAllocateEvent(AbstractThreadPool threadPool, Thread thread)This event may be fired when anAbstractThreadPoolimplementation allocates a new managedThread.voidonThreadPoolStartEvent(AbstractThreadPool threadPool)This event may be fired when anAbstractThreadPoolimplementation starts running.voidonThreadPoolStopEvent(AbstractThreadPool threadPool)This event may be fired when anAbstractThreadPoolimplementation stops.voidonThreadReleaseEvent(AbstractThreadPool threadPool, Thread thread)This event may be fired when a thread will no longer be managed by theAbstractThreadPoolimplementation.
-
-
-
Method Detail
-
onThreadPoolStartEvent
public void onThreadPoolStartEvent(AbstractThreadPool threadPool)
This event may be fired when an
AbstractThreadPoolimplementation starts running.- Specified by:
onThreadPoolStartEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitored
-
onThreadPoolStopEvent
public void onThreadPoolStopEvent(AbstractThreadPool threadPool)
This event may be fired when an
AbstractThreadPoolimplementation stops.- Specified by:
onThreadPoolStopEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitored
-
onThreadAllocateEvent
public void onThreadAllocateEvent(AbstractThreadPool threadPool, Thread thread)
This event may be fired when an
AbstractThreadPoolimplementation allocates a new managedThread.- Specified by:
onThreadAllocateEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitoredthread- the thread that has been allocated
-
onThreadReleaseEvent
public void onThreadReleaseEvent(AbstractThreadPool threadPool, Thread thread)
This event may be fired when a thread will no longer be managed by the
AbstractThreadPoolimplementation.- Specified by:
onThreadReleaseEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitoredthread- the thread that is no longer being managed by theAbstractThreadPool
-
onMaxNumberOfThreadsEvent
public void onMaxNumberOfThreadsEvent(AbstractThreadPool threadPool, int maxNumberOfThreads)
This event may be fired when the
AbstractThreadPoolimplementation has allocated and is managing a number of threads equal to the maximum limit of the pool.- Specified by:
onMaxNumberOfThreadsEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitoredmaxNumberOfThreads- the maximum number of threads allowed in theAbstractThreadPool
-
onTaskQueueEvent
public void onTaskQueueEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a task has been queued for processing.
- Specified by:
onTaskQueueEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitoredtask- a unit of work to be processed
-
onTaskDequeueEvent
public 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.
- Specified by:
onTaskDequeueEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitoredtask- a unit of work that is about to be processed.
-
onTaskCancelEvent
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.- Specified by:
onTaskCancelEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitoredtask- a unit of work that has been canceled
-
onTaskCompleteEvent
public void onTaskCompleteEvent(AbstractThreadPool threadPool, Runnable task)
This event may be fired when a dequeued task has completed processing.
- Specified by:
onTaskCompleteEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitoredtask- the unit of work that has completed processing
-
onTaskQueueOverflowEvent
public void onTaskQueueOverflowEvent(AbstractThreadPool threadPool)
This event may be fired when the task queue of the
AbstractThreadPoolimplementation has exceeded its configured size.- Specified by:
onTaskQueueOverflowEventin interfaceThreadPoolProbe- Parameters:
threadPool- theAbstractThreadPoolbeing monitored
-
-