public class JMXEnabledThreadPoolExecutor extends DebuggableThreadPoolExecutor implements JMXEnabledThreadPoolExecutorMBean
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicyblockingExecutionHandler, logger| Constructor and Description |
|---|
JMXEnabledThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
NamedThreadFactory threadFactory,
java.lang.String jmxPath) |
JMXEnabledThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
NamedThreadFactory threadFactory,
java.lang.String jmxPath) |
JMXEnabledThreadPoolExecutor(Stage stage) |
JMXEnabledThreadPoolExecutor(java.lang.String threadPoolName) |
JMXEnabledThreadPoolExecutor(java.lang.String threadPoolName,
int priority) |
JMXEnabledThreadPoolExecutor(java.lang.String threadPoolName,
java.lang.String jmxPath) |
| Modifier and Type | Method and Description |
|---|---|
long |
getCompletedTasks()
Get the number of completed tasks
|
int |
getCoreThreads()
Returns core pool size of thread pool.
|
int |
getCurrentlyBlockedTasks()
Get the number of tasks currently blocked, waiting to be accepted by
the executor (because all threads are busy and the backing queue is full).
|
int |
getMaximumThreads()
Returns maximum pool size of thread pool.
|
long |
getPendingTasks()
Get the number of tasks waiting to be executed
|
int |
getTotalBlockedTasks()
Get the number of tasks that had blocked before being accepted (or
rejected).
|
protected void |
onFinalAccept(java.lang.Runnable task) |
protected void |
onFinalRejection(java.lang.Runnable task) |
protected void |
onInitialRejection(java.lang.Runnable task) |
void |
setCoreThreads(int number)
Allows user to resize core pool size of the thread pool.
|
void |
setMaximumThreads(int number)
Allows user to resize maximum size of the thread pool.
|
void |
shutdown() |
java.util.List<java.lang.Runnable> |
shutdownNow() |
afterExecute, beforeExecute, createWithFixedPoolSize, createWithMaximumPoolSize, execute, execute, extractThrowable, handleOrLog, logExceptionsAfterExecute, maybeResetTraceSessionWrapper, newTaskFor, newTaskForallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toStringinvokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submitclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActiveCountpublic JMXEnabledThreadPoolExecutor(java.lang.String threadPoolName)
public JMXEnabledThreadPoolExecutor(java.lang.String threadPoolName,
java.lang.String jmxPath)
public JMXEnabledThreadPoolExecutor(java.lang.String threadPoolName,
int priority)
public JMXEnabledThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
NamedThreadFactory threadFactory,
java.lang.String jmxPath)
public JMXEnabledThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
NamedThreadFactory threadFactory,
java.lang.String jmxPath)
public JMXEnabledThreadPoolExecutor(Stage stage)
public void shutdown()
shutdown in interface java.util.concurrent.ExecutorServiceshutdown in class java.util.concurrent.ThreadPoolExecutorpublic java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow in interface java.util.concurrent.ExecutorServiceshutdownNow in class java.util.concurrent.ThreadPoolExecutorpublic long getCompletedTasks()
getCompletedTasks in interface IExecutorMBeanpublic long getPendingTasks()
getPendingTasks in interface IExecutorMBeanpublic int getTotalBlockedTasks()
JMXEnabledThreadPoolExecutorMBeangetTotalBlockedTasks in interface JMXEnabledThreadPoolExecutorMBeanpublic int getCurrentlyBlockedTasks()
JMXEnabledThreadPoolExecutorMBeangetCurrentlyBlockedTasks in interface JMXEnabledThreadPoolExecutorMBeanpublic int getCoreThreads()
JMXEnabledThreadPoolExecutorMBeangetCoreThreads in interface JMXEnabledThreadPoolExecutorMBeanpublic void setCoreThreads(int number)
JMXEnabledThreadPoolExecutorMBeansetCoreThreads in interface JMXEnabledThreadPoolExecutorMBeanpublic int getMaximumThreads()
JMXEnabledThreadPoolExecutorMBeangetMaximumThreads in interface JMXEnabledThreadPoolExecutorMBeanpublic void setMaximumThreads(int number)
JMXEnabledThreadPoolExecutorMBeansetMaximumThreads in interface JMXEnabledThreadPoolExecutorMBeanprotected void onInitialRejection(java.lang.Runnable task)
onInitialRejection in class DebuggableThreadPoolExecutorprotected void onFinalAccept(java.lang.Runnable task)
onFinalAccept in class DebuggableThreadPoolExecutorprotected void onFinalRejection(java.lang.Runnable task)
onFinalRejection in class DebuggableThreadPoolExecutorCopyright © 2015 The Apache Software Foundation