|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor
org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
public class JMXEnabledThreadPoolExecutor
This is a wrapper class for the ScheduledThreadPoolExecutor. It provides an implementation for the afterExecute() found in the ThreadPoolExecutor class to log any unexpected Runtime Exceptions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor |
---|
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy |
Field Summary |
---|
Fields inherited from class org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor |
---|
blockingExecutionHandler, logger |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor |
---|
afterExecute, beforeExecute, createWithFixedPoolSize, createWithMaximumPoolSize, execute, extractThrowable, handleOrLog, logExceptionsAfterExecute, newTaskFor, newTaskFor |
Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
---|
allowCoreThreadTimeOut, 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 |
Methods inherited from class java.util.concurrent.AbstractExecutorService |
---|
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cassandra.concurrent.IExecutorMBean |
---|
getActiveCount |
Constructor Detail |
---|
public 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)
Method Detail |
---|
public void shutdown()
shutdown
in interface java.util.concurrent.ExecutorService
shutdown
in class java.util.concurrent.ThreadPoolExecutor
public java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
in interface java.util.concurrent.ExecutorService
shutdownNow
in class java.util.concurrent.ThreadPoolExecutor
public long getCompletedTasks()
getCompletedTasks
in interface IExecutorMBean
public long getPendingTasks()
getPendingTasks
in interface IExecutorMBean
public int getTotalBlockedTasks()
JMXEnabledThreadPoolExecutorMBean
getTotalBlockedTasks
in interface JMXEnabledThreadPoolExecutorMBean
public int getCurrentlyBlockedTasks()
JMXEnabledThreadPoolExecutorMBean
getCurrentlyBlockedTasks
in interface JMXEnabledThreadPoolExecutorMBean
public int getCoreThreads()
JMXEnabledThreadPoolExecutorMBean
getCoreThreads
in interface JMXEnabledThreadPoolExecutorMBean
public void setCoreThreads(int number)
JMXEnabledThreadPoolExecutorMBean
setCoreThreads
in interface JMXEnabledThreadPoolExecutorMBean
public int getMaximumThreads()
JMXEnabledThreadPoolExecutorMBean
getMaximumThreads
in interface JMXEnabledThreadPoolExecutorMBean
public void setMaximumThreads(int number)
JMXEnabledThreadPoolExecutorMBean
setMaximumThreads
in interface JMXEnabledThreadPoolExecutorMBean
protected void onInitialRejection(java.lang.Runnable task)
onInitialRejection
in class DebuggableThreadPoolExecutor
protected void onFinalAccept(java.lang.Runnable task)
onFinalAccept
in class DebuggableThreadPoolExecutor
protected void onFinalRejection(java.lang.Runnable task)
onFinalRejection
in class DebuggableThreadPoolExecutor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |