- All Implemented Interfaces:
ThreadPoolProbe
- Enclosing interface:
ThreadPoolProbe
ThreadPoolProbe adapter 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidonMaxNumberOfThreadsEvent(ThreadPoolInfo threadPool, int maxNumberOfThreads) This event may be fired when theThreadPoolInfoimplementation has allocated and is managing a number of threads equal to the maximum limit of the pool.voidonTaskCancelEvent(ThreadPoolInfo threadPool, Runnable task) This event may be fired when a dequeued task has been canceled.voidonTaskCompleteEvent(ThreadPoolInfo threadPool, Runnable task) This event may be fired when a dequeued task has completed processing.voidonTaskDequeueEvent(ThreadPoolInfo threadPool, Runnable task) This event may be fired when a task has been pulled from the queue and is about to be processed.voidonTaskQueueEvent(ThreadPoolInfo threadPool, Runnable task) This event may be fired when a task has been queued for processing.voidonTaskQueueOverflowEvent(ThreadPoolInfo threadPool) This event may be fired when the task queue of theThreadPoolInfoimplementation has exceeded its configured size.voidonThreadAllocateEvent(ThreadPoolInfo threadPool, Thread thread) This event may be fired when anThreadPoolInfoimplementation allocates a new managedThread.voidonThreadPoolStartEvent(ThreadPoolInfo threadPool) This event may be fired when anThreadPoolInfoimplementation starts running.voidonThreadPoolStopEvent(ThreadPoolInfo threadPool) This event may be fired when anThreadPoolInfoimplementation stops.voidonThreadReleaseEvent(ThreadPoolInfo threadPool, Thread thread) This event may be fired when a thread will no longer be managed by theThreadPoolInfoimplementation.
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
onThreadPoolStartEvent
This event may be fired when an
ThreadPoolInfoimplementation starts running.- Specified by:
onThreadPoolStartEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitored
-
onThreadPoolStopEvent
This event may be fired when an
ThreadPoolInfoimplementation stops.- Specified by:
onThreadPoolStopEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitored
-
onThreadAllocateEvent
This event may be fired when an
ThreadPoolInfoimplementation allocates a new managedThread.- Specified by:
onThreadAllocateEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitoredthread- the thread that has been allocated
-
onThreadReleaseEvent
This event may be fired when a thread will no longer be managed by the
ThreadPoolInfoimplementation.- Specified by:
onThreadReleaseEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitoredthread- the thread that is no longer being managed by theThreadPoolInfo
-
onMaxNumberOfThreadsEvent
This event may be fired when the
ThreadPoolInfoimplementation has allocated and is managing a number of threads equal to the maximum limit of the pool.- Specified by:
onMaxNumberOfThreadsEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitoredmaxNumberOfThreads- the maximum number of threads allowed in theThreadPoolInfo
-
onTaskQueueEvent
This event may be fired when a task has been queued for processing.
- Specified by:
onTaskQueueEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitoredtask- a unit of work to be processed
-
onTaskDequeueEvent
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- theThreadPoolInfobeing monitoredtask- a unit of work that is about to be processed.
-
onTaskCancelEvent
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- theThreadPoolInfobeing monitoredtask- a unit of work that has been canceled
-
onTaskCompleteEvent
This event may be fired when a dequeued task has completed processing.
- Specified by:
onTaskCompleteEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitoredtask- the unit of work that has completed processing
-
onTaskQueueOverflowEvent
This event may be fired when the task queue of the
ThreadPoolInfoimplementation has exceeded its configured size.- Specified by:
onTaskQueueOverflowEventin interfaceThreadPoolProbe- Parameters:
threadPool- theThreadPoolInfobeing monitored
-