public class QThreadPoolExecutor extends QBeanSupport implements QThreadPoolExecutorMBean
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TERMINATION_TIMER |
static java.lang.String |
THREAD_POOL_EXECUTOR__QBEAN_PREFIX |
static java.lang.String |
XML_CONFIG_ATTR__EXEC_SRV_COREPOOLSIZE |
static java.lang.String |
XML_CONFIG_ATTR__EXEC_SRV_TERMINATION_TIMER |
static java.lang.String |
XML_CONFIG_ATTR__EXEC_SRV_TYPE |
cfg, log, scheduledThreadPoolExecutor| Constructor and Description |
|---|
QThreadPoolExecutor() |
| Modifier and Type | Method and Description |
|---|---|
int |
getActiveCount() |
protected org.jdom2.Attribute |
getAttribute(org.jdom2.Element elt,
java.lang.String attrName,
boolean mandatory,
java.lang.String errDesc) |
long |
getCompletedTaskCount() |
int |
getCorePoolSize() |
java.lang.String |
getExecSrvType() |
int |
getInitialCorePoolSize() |
long |
getKeepAliveTimeMS() |
int |
getLargestPoolSize() |
int |
getMaximumPoolSize() |
int |
getPoolSize() |
protected java.lang.String |
getRegistrationName() |
long |
getTaskCount() |
int |
getTerminationTimer() |
static java.util.concurrent.ThreadPoolExecutor |
getThreadPoolExecutor(java.lang.String name)
Retrieves a thread pool executor from NameRegistrar given its name
|
static <T extends java.util.concurrent.ThreadPoolExecutor> |
getThreadPoolExecutor(java.lang.String name,
java.lang.Class<T> clazz)
Retrieves a thread pool executor from NameRegistrar given its name, and
its expected class
|
protected void |
initService()
Handle specific config elements
type := "fixed" | "scheduled" | "cached" corePoolSize := integer
(required for "fixed" and "scheduled" kinds, optional for "cached" kind)
|
boolean |
isShutdown() |
boolean |
isTerminated() |
boolean |
isTerminating() |
protected void |
setExecSrvType(java.lang.String execSrvType) |
protected void |
setInitialCorePoolSize(int initialCorePoolSize) |
protected void |
setTerminationTimer(int terminationTimer) |
protected void |
startService() |
protected void |
stopService() |
addAttr, close, createElement, destroy, destroyService, getAttrs, getAttrs, getConfiguration, getDump, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getProperties, getProperty, getRealm, getScheduledThreadPoolExecutor, getServer, getState, getStateAsString, init, isModified, running, setAttr, setConfiguration, setLogger, setModified, setName, setPersist, setProperty, setRealm, setServer, setState, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServerdestroy, getState, getStateAsString, init, start, stopgetPersist, isModifiedpublic static final java.lang.String THREAD_POOL_EXECUTOR__QBEAN_PREFIX
public static final java.lang.String XML_CONFIG_ATTR__EXEC_SRV_TYPE
public static final java.lang.String XML_CONFIG_ATTR__EXEC_SRV_COREPOOLSIZE
public static final java.lang.String XML_CONFIG_ATTR__EXEC_SRV_TERMINATION_TIMER
public static final int DEFAULT_TERMINATION_TIMER
protected void initService()
throws java.lang.Exception
initService in class QBeanSupportjava.lang.Exceptionprotected void startService()
throws java.lang.Exception
startService in class QBeanSupportjava.lang.Exceptionprotected void stopService()
throws java.lang.Exception
stopService in class QBeanSupportjava.lang.Exceptionprotected java.lang.String getRegistrationName()
protected org.jdom2.Attribute getAttribute(org.jdom2.Element elt,
java.lang.String attrName,
boolean mandatory,
java.lang.String errDesc)
throws ConfigurationException
elt - attrName - mandatory - errDesc - ConfigurationExceptionpublic static java.util.concurrent.ThreadPoolExecutor getThreadPoolExecutor(java.lang.String name)
throws NameRegistrar.NotFoundException
name - NameRegistrar.NotFoundExceptionpublic static <T extends java.util.concurrent.ThreadPoolExecutor> T getThreadPoolExecutor(java.lang.String name,
java.lang.Class<T> clazz)
throws NameRegistrar.NotFoundException
name - clazz - NameRegistrar.NotFoundExceptionpublic java.lang.String getExecSrvType()
getExecSrvType in interface QThreadPoolExecutorMBeanpublic int getTerminationTimer()
getTerminationTimer in interface QThreadPoolExecutorMBeanpublic int getActiveCount()
throws NameRegistrar.NotFoundException
getActiveCount in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic long getCompletedTaskCount()
throws NameRegistrar.NotFoundException
getCompletedTaskCount in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic int getCorePoolSize()
throws NameRegistrar.NotFoundException
getCorePoolSize in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic long getKeepAliveTimeMS()
throws NameRegistrar.NotFoundException
getKeepAliveTimeMS in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic int getLargestPoolSize()
throws NameRegistrar.NotFoundException
getLargestPoolSize in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic int getMaximumPoolSize()
throws NameRegistrar.NotFoundException
getMaximumPoolSize in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic int getPoolSize()
throws NameRegistrar.NotFoundException
getPoolSize in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic long getTaskCount()
throws NameRegistrar.NotFoundException
getTaskCount in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic boolean isShutdown()
throws NameRegistrar.NotFoundException
isShutdown in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic boolean isTerminated()
throws NameRegistrar.NotFoundException
isTerminated in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic boolean isTerminating()
throws NameRegistrar.NotFoundException
isTerminating in interface QThreadPoolExecutorMBeanNameRegistrar.NotFoundExceptionpublic int getInitialCorePoolSize()
protected void setExecSrvType(java.lang.String execSrvType)
protected void setInitialCorePoolSize(int initialCorePoolSize)
protected void setTerminationTimer(int terminationTimer)