public class JMXEnabledOrderedMemoryAwareThreadPoolExecutor extends org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor implements JMXEnabledOrderedMemoryAwareThreadPoolExecutorMBean
OrderedMemoryAwareThreadPoolExecutor
subclass which expose statistics via JMXThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
JMXEnabledOrderedMemoryAwareThreadPoolExecutor(int corePoolSize,
long maxChannelMemorySize,
long maxTotalMemorySize,
String jmxPath,
String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
protected void |
beforeExecute(Thread t,
Runnable r) |
int |
getActiveTasks()
Return the active Tasks
|
int |
getActiveThreads()
Return the active threads
|
double |
getAverageTaskTime()
Return the average time for a task (in ms)
|
int |
getMaximalThreads()
Return the maximal allowed count of threads
|
int |
getQueuedTasks()
Return the queued tasks
|
int |
getTotalTasks()
Return the total tasks handled by this executor
|
void |
shutdown() |
List<Runnable> |
shutdownNow() |
doExecute, getChildExecutorKey, getChildExecutorKeySet, newChildExecutorMap, removeChildExecutor, shouldCount
decreaseCounter, doUnorderedExecute, execute, getMaxChannelMemorySize, getMaxTotalMemorySize, getObjectSizeEstimator, increaseCounter, remove, setMaxChannelMemorySize, setMaxTotalMemorySize, setObjectSizeEstimator, terminated
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
protected void beforeExecute(Thread t, Runnable r)
beforeExecute
in class org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor
protected void afterExecute(Runnable r, Throwable t)
afterExecute
in class ThreadPoolExecutor
public void shutdown()
shutdown
in interface ExecutorService
shutdown
in class ThreadPoolExecutor
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
shutdownNow
in class ThreadPoolExecutor
public int getTotalTasks()
JMXEnabledThreadPoolExecutorMBean
getTotalTasks
in interface JMXEnabledThreadPoolExecutorMBean
JMXEnabledThreadPoolExecutorMBean.getTotalTasks()
public double getAverageTaskTime()
JMXEnabledThreadPoolExecutorMBean
getAverageTaskTime
in interface JMXEnabledThreadPoolExecutorMBean
JMXEnabledThreadPoolExecutorMBean.getAverageTaskTime()
public int getActiveThreads()
JMXEnabledThreadPoolExecutorMBean
getActiveThreads
in interface JMXEnabledThreadPoolExecutorMBean
JMXEnabledThreadPoolExecutorMBean.getActiveThreads()
public int getActiveTasks()
JMXEnabledThreadPoolExecutorMBean
getActiveTasks
in interface JMXEnabledThreadPoolExecutorMBean
JMXEnabledThreadPoolExecutorMBean.getActiveTasks()
public int getQueuedTasks()
JMXEnabledThreadPoolExecutorMBean
getQueuedTasks
in interface JMXEnabledThreadPoolExecutorMBean
JMXEnabledThreadPoolExecutorMBean.getQueuedTasks()
public int getMaximalThreads()
JMXEnabledThreadPoolExecutorMBean
getMaximalThreads
in interface JMXEnabledThreadPoolExecutorMBean
JMXEnabledThreadPoolExecutorMBean.getMaximalThreads()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.