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, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServer
destroy, getState, getStateAsString, init, start, stop
getPersist, isModified
public 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 QBeanSupport
java.lang.Exception
protected void startService() throws java.lang.Exception
startService
in class QBeanSupport
java.lang.Exception
protected void stopService() throws java.lang.Exception
stopService
in class QBeanSupport
java.lang.Exception
protected 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
- ConfigurationException
public static java.util.concurrent.ThreadPoolExecutor getThreadPoolExecutor(java.lang.String name) throws NameRegistrar.NotFoundException
name
- NameRegistrar.NotFoundException
public static <T extends java.util.concurrent.ThreadPoolExecutor> T getThreadPoolExecutor(java.lang.String name, java.lang.Class<T> clazz) throws NameRegistrar.NotFoundException
name
- clazz
- NameRegistrar.NotFoundException
public java.lang.String getExecSrvType()
getExecSrvType
in interface QThreadPoolExecutorMBean
public int getTerminationTimer()
getTerminationTimer
in interface QThreadPoolExecutorMBean
public int getActiveCount() throws NameRegistrar.NotFoundException
getActiveCount
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public long getCompletedTaskCount() throws NameRegistrar.NotFoundException
getCompletedTaskCount
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public int getCorePoolSize() throws NameRegistrar.NotFoundException
getCorePoolSize
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public long getKeepAliveTimeMS() throws NameRegistrar.NotFoundException
getKeepAliveTimeMS
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public int getLargestPoolSize() throws NameRegistrar.NotFoundException
getLargestPoolSize
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public int getMaximumPoolSize() throws NameRegistrar.NotFoundException
getMaximumPoolSize
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public int getPoolSize() throws NameRegistrar.NotFoundException
getPoolSize
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public long getTaskCount() throws NameRegistrar.NotFoundException
getTaskCount
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public boolean isShutdown() throws NameRegistrar.NotFoundException
isShutdown
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public boolean isTerminated() throws NameRegistrar.NotFoundException
isTerminated
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public boolean isTerminating() throws NameRegistrar.NotFoundException
isTerminating
in interface QThreadPoolExecutorMBean
NameRegistrar.NotFoundException
public int getInitialCorePoolSize()
protected void setExecSrvType(java.lang.String execSrvType)
protected void setInitialCorePoolSize(int initialCorePoolSize)
protected void setTerminationTimer(int terminationTimer)