Interface ThreadPoolMBean
-
@ProviderType public interface ThreadPoolMBean
This is the management interface for a Sling Thread Pool.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetBlockPolicy()Retrieve the block policy of the thread pool.intgetExecutorActiveCount()Retrieve the active count from the pool's Executor.longgetExecutorCompletedTaskCount()Retrieve the completed task count from the pool's Executor.intgetExecutorCorePoolSize()Retrieve the core pool size from the pool's Executor.intgetExecutorLargestPoolSize()Retrieve the largest pool size from the pool's Executor.intgetExecutorMaximumPoolSize()Retrieve the maximum pool size from the pool's Executor.intgetExecutorPoolSize()Retrieve the pool size from the pool's Executor.longgetExecutorTaskCount()Retrieve the task count from the pool's Executor.longgetKeepAliveTime()Return the configured keep alive time.intgetMaxPoolSize()Return the configured maximum pool size.longgetMaxThreadAge()Deprecated.Since version 1.1.1 always returns -1 as threads are no longer retired but instead the thread locals are cleaned up (SLING-6261)intgetMinPoolSize()Return the minimum pool size.java.lang.StringgetName()Return the name of the thread pooljava.lang.StringgetPid()Return the configuration pid of the thread pool.java.lang.StringgetPriority()Return the configured priority of the thread pool.intgetQueueSize()Return the configured queue size.intgetShutdownWaitTimeMs()Return the configured shutdown wait time in milliseconds.booleanisDaemon()Return whether or not the thread pool creates daemon threads.booleanisShutdownGraceful()Return whether or not the thread pool is configured to shutdown gracefully.booleanisUsed()Return whether or not the thread pool is in use.
-
-
-
Method Detail
-
getBlockPolicy
java.lang.String getBlockPolicy()
Retrieve the block policy of the thread pool.- Returns:
- the block policy
-
getExecutorActiveCount
int 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
-
getExecutorCompletedTaskCount
long 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
-
getExecutorCorePoolSize
int 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
-
getExecutorLargestPoolSize
int 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
-
getExecutorMaximumPoolSize
int 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
-
getExecutorPoolSize
int 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
-
getExecutorTaskCount
long getExecutorTaskCount()
Retrieve the task count from the pool's Executor.- Returns:
- the task count or -1 if the thread pool does not have an Executor
-
getMaxThreadAge
@Deprecated long getMaxThreadAge()
Deprecated.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.
-
getKeepAliveTime
long getKeepAliveTime()
Return the configured keep alive time.- Returns:
- The configured keep alive time.
-
getMaxPoolSize
int getMaxPoolSize()
Return the configured maximum pool size.- Returns:
- The configured maximum pool size.
-
getMinPoolSize
int getMinPoolSize()
Return the minimum pool size.- Returns:
- The minimum pool size.
-
getName
java.lang.String getName()
Return the name of the thread pool- Returns:
- the name
-
getPid
java.lang.String getPid()
Return the configuration pid of the thread pool.- Returns:
- the pid
-
getPriority
java.lang.String getPriority()
Return the configured priority of the thread pool.- Returns:
- the priority
-
getQueueSize
int getQueueSize()
Return the configured queue size.- Returns:
- The configured queue size.
-
getShutdownWaitTimeMs
int getShutdownWaitTimeMs()
Return the configured shutdown wait time in milliseconds.- Returns:
- The configured shutdown wait time.
-
isDaemon
boolean isDaemon()
Return whether or not the thread pool creates daemon threads.- Returns:
- The daemon configuration.
-
isShutdownGraceful
boolean isShutdownGraceful()
Return whether or not the thread pool is configured to shutdown gracefully.- Returns:
- The graceful shutdown configuration.
-
isUsed
boolean isUsed()
Return whether or not the thread pool is in use.- Returns:
- The used state of the pool.
-
-