Interface ThreadPoolMBean
@ProviderType
public interface ThreadPoolMBean
This is the management interface for a Sling Thread Pool.
- 
Method SummaryModifier and TypeMethodDescriptionRetrieve the block policy of the thread pool.longRetrieve the number of tasks in the work queue of the pool's Executor.intRetrieve the active count from the pool's Executor.longRetrieve the completed task count from the pool's Executor.intRetrieve the core pool size from the pool's Executor.intRetrieve the largest pool size from the pool's Executor.intRetrieve the maximum pool size from the pool's Executor.intRetrieve the pool size from the pool's Executor.longRetrieve the task count from the pool's Executor.longReturn the configured keep alive time.intReturn the configured maximum pool size.longDeprecated.Since version 1.1.1 always returns -1 as threads are no longer retired but instead the thread locals are cleaned up (SLING-6261)intReturn the minimum pool size.getName()Return the name of the thread poolgetPid()Return the configuration pid of the thread pool.Return the configured priority of the thread pool.intReturn the configured queue size.intReturn the configured shutdown wait time in milliseconds.booleanisDaemon()Return whether or not the thread pool creates daemon threads.booleanReturn whether or not the thread pool is configured to shutdown gracefully.booleanisUsed()Return whether or not the thread pool is in use.
- 
Method Details- 
getBlockPolicyString getBlockPolicy()Retrieve the block policy of the thread pool.- Returns:
- the block policy
 
- 
getExecutorActiveCountint getExecutorActiveCount()Retrieve the active count from the pool's Executor.- Returns:
- the active count or -1 if the thread pool does not have an Executor
 
- 
getExecutorCompletedTaskCountlong getExecutorCompletedTaskCount()Retrieve the completed task count from the pool's Executor.- Returns:
- the completed task count or -1 if the thread pool does not have an Executor
 
- 
getExecutorCorePoolSizeint getExecutorCorePoolSize()Retrieve the core pool size from the pool's Executor.- Returns:
- the core pool size or -1 if the thread pool does not have an Executor
 
- 
getExecutorLargestPoolSizeint getExecutorLargestPoolSize()Retrieve the largest pool size from the pool's Executor.- Returns:
- the largest pool size or -1 if the thread pool does not have an Executor
 
- 
getExecutorMaximumPoolSizeint getExecutorMaximumPoolSize()Retrieve the maximum pool size from the pool's Executor.- Returns:
- the maximum pool size or -1 if the thread pool does not have an Executor
 
- 
getExecutorPoolSizeint getExecutorPoolSize()Retrieve the pool size from the pool's Executor.- Returns:
- the pool size or -1 if the thread pool does not have an Executor
 
- 
getExecutorTaskCountlong getExecutorTaskCount()Retrieve the task count from the pool's Executor. This is the total number of tasks, which have ever been scheduled to this threadpool. They might have been processed yet or not.- Returns:
- the task count or -1 if the thread pool does not have an Executor
 
- 
getExcutorTasksInWorkQueueCountlong getExcutorTasksInWorkQueueCount()Retrieve the number of tasks in the work queue of the pool's Executor. These are the tasks which have been already submitted to the threadpool, but which are not yet executed.- Returns:
- the number of tasks in the work queue -1 if the thread pool does not have an Executor
 
- 
getMaxThreadAgeDeprecated.Since version 1.1.1 always returns -1 as threads are no longer retired but instead the thread locals are cleaned up (SLING-6261)Return the configured max thread age.- Returns:
- The configured max thread age.
 
- 
getKeepAliveTimelong getKeepAliveTime()Return the configured keep alive time.- Returns:
- The configured keep alive time.
 
- 
getMaxPoolSizeint getMaxPoolSize()Return the configured maximum pool size.- Returns:
- The configured maximum pool size.
 
- 
getMinPoolSizeint getMinPoolSize()Return the minimum pool size.- Returns:
- The minimum pool size.
 
- 
getNameString getName()Return the name of the thread pool- Returns:
- the name
 
- 
getPidString getPid()Return the configuration pid of the thread pool.- Returns:
- the pid
 
- 
getPriorityString getPriority()Return the configured priority of the thread pool.- Returns:
- the priority
 
- 
getQueueSizeint getQueueSize()Return the configured queue size.- Returns:
- The configured queue size.
 
- 
getShutdownWaitTimeMsint getShutdownWaitTimeMs()Return the configured shutdown wait time in milliseconds.- Returns:
- The configured shutdown wait time.
 
- 
isDaemonboolean isDaemon()Return whether or not the thread pool creates daemon threads.- Returns:
- The daemon configuration.
 
- 
isShutdownGracefulboolean isShutdownGraceful()Return whether or not the thread pool is configured to shutdown gracefully.- Returns:
- The graceful shutdown configuration.
 
- 
isUsedboolean isUsed()Return whether or not the thread pool is in use.- Returns:
- The used state of the pool.
 
 
-