Package org.jivesoftware.openfire.mbean
Interface ThreadPoolExecutorDelegateMBean
- All Known Implementing Classes:
ThreadPoolExecutorDelegate
public interface ThreadPoolExecutorDelegateMBean
MBean definition for a Threadpool-based executor (@link
ThreadPoolExecutor- Author:
- Guus der Kinderen, guus@goodbytes.nl
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintReturns the approximate number of threads that are actively executing tasks.longReturns the approximate total number of tasks that have completed execution.intReturns the core number of threads.intReturns the largest number of threads that have ever simultaneously been in the pool.intReturns the maximum allowed number of threads.intReturns the current number of threads in the pool.intReturns the number of tasks that are currently waiting to be executed by the delegate executor.intReturns the number of additional elements that task queue used by the delegate executor can ideally (in the absence of memory or resource constraints) accept without blocking, orInteger.MAX_VALUEif there is no intrinsic limit.longReturns the approximate total number of tasks that have ever been scheduled for execution.
-
Field Details
-
BASE_OBJECT_NAME
- See Also:
-
-
Method Details
-
getCorePoolSize
int getCorePoolSize()Returns the core number of threads.- Returns:
- the core number of threads
-
getPoolSize
int getPoolSize()Returns the current number of threads in the pool.- Returns:
- the number of threads
-
getLargestPoolSize
int getLargestPoolSize()Returns the largest number of threads that have ever simultaneously been in the pool.- Returns:
- the number of threads
-
getMaximumPoolSize
int getMaximumPoolSize()Returns the maximum allowed number of threads.- Returns:
- the maximum allowed number of threads
-
getActiveCount
int getActiveCount()Returns the approximate number of threads that are actively executing tasks.- Returns:
- the number of threads
-
getQueuedTaskCount
int getQueuedTaskCount()Returns the number of tasks that are currently waiting to be executed by the delegate executor.- Returns:
- the task queue size
-
getQueueRemainingCapacity
int getQueueRemainingCapacity()Returns the number of additional elements that task queue used by the delegate executor can ideally (in the absence of memory or resource constraints) accept without blocking, orInteger.MAX_VALUEif there is no intrinsic limit.- Returns:
- the remaining capacity
-
getTaskCount
long getTaskCount()Returns the approximate total number of tasks that have ever been scheduled for execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation.- Returns:
- the number of tasks
-
getCompletedTaskCount
long getCompletedTaskCount()Returns the approximate total number of tasks that have completed execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation, but one that does not ever decrease across successive calls.- Returns:
- the number of tasks
-