- All Known Implementing Classes:
ThreadPoolProbe.Adapter
ThreadPoolInfo implementations.- Since:
- 1.9.19
- Author:
- gustav trede, Alexey Stashok
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThreadPoolProbeadapter that provides no-op implementations for all interface methods allowing easy extension by the developer. -
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.
-
Method Details
-
onThreadPoolStartEvent
This event may be fired when an
ThreadPoolInfoimplementation starts running.- Parameters:
threadPool- theThreadPoolInfobeing monitored
-
onThreadPoolStopEvent
This event may be fired when an
ThreadPoolInfoimplementation stops.- Parameters:
threadPool- theThreadPoolInfobeing monitored
-
onThreadAllocateEvent
This event may be fired when an
ThreadPoolInfoimplementation allocates a new managedThread.- 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.- 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.- 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.
- 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.
- 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.- 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.
- 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.- Parameters:
threadPool- theThreadPoolInfobeing monitored
-