Package org.apache.cassandra.concurrent
Class JMXEnabledSingleThreadExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor
-
- org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
-
- org.apache.cassandra.concurrent.JMXEnabledSingleThreadExecutor
-
- All Implemented Interfaces:
java.util.concurrent.Executor,java.util.concurrent.ExecutorService,JMXEnabledThreadPoolExecutorMBean,LocalAwareExecutorService,ResizableThreadPool
public class JMXEnabledSingleThreadExecutor extends JMXEnabledThreadPoolExecutor
-
-
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
-
Nested classes/interfaces inherited from interface org.apache.cassandra.concurrent.LocalAwareExecutorService
LocalAwareExecutorService.MaximumPoolSizeListener
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
metrics
-
Fields inherited from class org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor
blockingExecutionHandler, logger
-
-
Constructor Summary
Constructors Constructor Description JMXEnabledSingleThreadExecutor(java.lang.String threadPoolName, java.lang.String jmxPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.cassandra.concurrent.JMXEnabledSingleThreadExecutor.SingleThreadFactorygetThreadFactory()booleanisExecutedBy(java.lang.Thread test)voidsetCoreThreads(int number)Allows user to resize core pool size of the thread pool.voidsetMaximumPoolSize(int newMaximumPoolSize)Allows user to resize maximum size of the thread pool.voidsetMaximumThreads(int number)Allows user to resize maximum size of the thread pool.voidsetThreadFactory(java.util.concurrent.ThreadFactory threadFactory)-
Methods inherited from class org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
getCoreThreads, getCurrentlyBlockedTasks, getMaximumThreads, getTotalBlockedTasks, onFinalAccept, onFinalRejection, onInitialRejection, shutdown, shutdownNow
-
Methods inherited from class org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor
afterExecute, beforeExecute, createCachedThreadpoolWithMaxSize, createWithFixedPoolSize, createWithMaximumPoolSize, execute, execute, extractThrowable, getActiveTaskCount, getPendingTaskCount, handleOrLog, logExceptionsAfterExecute, maybeExecuteImmediately, maybeResetLocalSessionWrapper, newTaskFor, newTaskFor
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setRejectedExecutionHandler, terminated, toString
-
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, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, submit, submit, submit
-
Methods inherited from interface org.apache.cassandra.concurrent.LocalAwareExecutorService
getCompletedTaskCount, getMaxTasksQueued
-
Methods inherited from interface org.apache.cassandra.concurrent.ResizableThreadPool
getCorePoolSize, getMaximumPoolSize, setCorePoolSize
-
-
-
-
Method Detail
-
setCoreThreads
public void setCoreThreads(int number)
Description copied from interface:JMXEnabledThreadPoolExecutorMBeanAllows user to resize core pool size of the thread pool. Deprecated, use setCorePoolSize instead.- Specified by:
setCoreThreadsin interfaceJMXEnabledThreadPoolExecutorMBean- Overrides:
setCoreThreadsin classJMXEnabledThreadPoolExecutor
-
setMaximumThreads
public void setMaximumThreads(int number)
Description copied from interface:JMXEnabledThreadPoolExecutorMBeanAllows user to resize maximum size of the thread pool. Deprecated, use setMaximumThreads instead.- Specified by:
setMaximumThreadsin interfaceJMXEnabledThreadPoolExecutorMBean- Overrides:
setMaximumThreadsin classJMXEnabledThreadPoolExecutor
-
setMaximumPoolSize
public void setMaximumPoolSize(int newMaximumPoolSize)
Description copied from interface:ResizableThreadPoolAllows user to resize maximum size of the thread pool.- Specified by:
setMaximumPoolSizein interfaceResizableThreadPool- Overrides:
setMaximumPoolSizein classJMXEnabledThreadPoolExecutor
-
isExecutedBy
public boolean isExecutedBy(java.lang.Thread test)
-
getThreadFactory
public org.apache.cassandra.concurrent.JMXEnabledSingleThreadExecutor.SingleThreadFactory getThreadFactory()
- Overrides:
getThreadFactoryin classjava.util.concurrent.ThreadPoolExecutor
-
setThreadFactory
public void setThreadFactory(java.util.concurrent.ThreadFactory threadFactory)
- Overrides:
setThreadFactoryin classjava.util.concurrent.ThreadPoolExecutor
-
-