org.apache.sling.commons.threads.jmx
Interface ThreadPoolMBean


public interface ThreadPoolMBean

This is the management interface for a Sling Thread Pool.


Method Summary
 String getBlockPolicy()
          Retrieve the block policy of the thread pool.
 int getExecutorActiveCount()
          Retrieve the active count from the pool's Executor.
 long getExecutorCompletedTaskCount()
          Retrieve the completed task count from the pool's Executor.
 int getExecutorCorePoolSize()
          Retrieve the core pool size from the pool's Executor.
 int getExecutorLargestPoolSize()
          Retrieve the largest pool size from the pool's Executor.
 int getExecutorMaximumPoolSize()
          Retrieve the maximum pool size from the pool's Executor.
 int getExecutorPoolSize()
          Retrieve the pool size from the pool's Executor.
 long getExecutorTaskCount()
          Retrieve the task count from the pool's Executor.
 long getKeepAliveTime()
          Return the configured keep alive time.
 int getMaxPoolSize()
          Return the configured maximum pool size.
 int getMinPoolSize()
          Return the minimum pool size.
 String getName()
          Return the name of the thread pool
 String getPid()
          Return the configuration pid of the thread pool.
 String getPriority()
          Return the configured priority of the thread pool.
 int getQueueSize()
          Return the configured queue size.
 int getShutdownWaitTimeMs()
          Return the configured shutdown wait time in milliseconds.
 boolean isDaemon()
          Return whether or not the thread pool creates daemon threads.
 boolean isShutdownGraceful()
          Return whether or not the thread pool is configured to shutdown gracefully.
 boolean isUsed()
          Return whether or not the thread pool is in use.
 

Method Detail

getBlockPolicy

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

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

String getName()
Return the name of the thread pool

Returns:
the name

getPid

String getPid()
Return the configuration pid of the thread pool.

Returns:
the pid

getPriority

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.


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.