Interface QThreadPoolExecutorMBean
- All Superinterfaces:
QBean, QBeanSupportMBean, QPersist
- All Known Implementing Classes:
QThreadPoolExecutor
JMX management interface for the Q2 thread-pool executor QBean.
-
Field Summary
Fields inherited from interface QBean
DESTROYED, FAILED, STARTED, STARTING, stateString, STOPPED, STOPPINGModifier and TypeFieldDescriptionstatic final intQBean has been destroyed.static final intQBean has failed.static final intQBean is running.static final intQBean is in the process of starting.static final String[]Human-readable names for each QBean state, indexed by state constant.static final intQBean is stopped.static final intQBean is in the process of stopping. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the approximate number of threads that are actively executing tasks.longReturns the approximate total number of tasks that have completed execution.intReturns the core number of threads.Returns the executor service type.longReturns the thread keep-alive time in milliseconds.intReturns the largest number of threads that have ever simultaneously been in the pool.intReturns the maximum allowed number of threads.intReturns the current number of threads in the pool.longReturns the approximate total number of tasks that have been scheduled for execution.intReturns the await-termination delay in milliseconds.booleanReturns whether this executor has been shut down.booleanReturns whether all tasks have completed following shut down.booleanReturns whether this executor is in the process of terminating after shutdown.Methods inherited from interface QBean
destroy, getState, getStateAsString, init, start, stopMethods inherited from interface QBeanSupportMBean
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServerModifier and TypeMethodDescriptiongetDump()Returns a human-readable dump of this bean's state.Returns the QClassLoader for this bean.URL[]Returns the URLs registered with the class loader.Returns the logger name.getName()Returns the bean name.getRealm()Returns the logging realm.Returns the Q2 server instance.voidSets the logger by name.voidSets the bean name.voidsetPersist(org.jdom2.Element e) Sets the persistent configuration element.voidSets the logging realm.voidSets the Q2 server instance for this QBean.Methods inherited from interface QPersist
getPersist, isModifiedModifier and TypeMethodDescriptionorg.jdom2.ElementReturns the persistent configuration element for this QBean.booleanReturnstrueif this QBean's configuration has been modified since last save.
-
Method Details
-
getExecSrvType
-
getTerminationTimer
int getTerminationTimer()Returns the await-termination delay in milliseconds.- Returns:
- await termination delay
-
getActiveCount
Returns the approximate number of threads that are actively executing tasks.- Returns:
- approximate number of threads that are actively executing tasks
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
getCompletedTaskCount
Returns the approximate total number of tasks that have completed execution.- Returns:
- the approximate total number of tasks that have completed execution.
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
getCorePoolSize
Returns the core number of threads.- Returns:
- returns the core number of threads.
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
getKeepAliveTimeMS
Returns the thread keep-alive time in milliseconds.- Returns:
- the thread keep-alive time, which is the amount of time (in milliseconds) which threads in excess of the core pool size may remain idle before being terminated
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
getLargestPoolSize
Returns the largest number of threads that have ever simultaneously been in the pool.- Returns:
- the largest number of threads that have ever simultaneously been in the pool.
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
getMaximumPoolSize
Returns the maximum allowed number of threads.- Returns:
- the maximum allowed number of threads.
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
getPoolSize
Returns the current number of threads in the pool.- Returns:
- the current number of threads in the pool.
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
getTaskCount
Returns the approximate total number of tasks that have been scheduled for execution.- Returns:
- the approximate total number of tasks that have been scheduled for execution
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
isShutdown
Returns whether this executor has been shut down.- Returns:
- true if this executor has been shut down.
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
isTerminated
Returns whether all tasks have completed following shut down.- Returns:
- true if all tasks have completed following shut down
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-
isTerminating
Returns whether this executor is in the process of terminating after shutdown.- Returns:
- true if this executor is in the process of terminating after shutdown or shutdownNow but has not completely terminated.
- Throws:
NameRegistrar.NotFoundException- if the executor cannot be found in the name registrar
-