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.SingleThreadFactory
getThreadFactory()
boolean
isExecutedBy(java.lang.Thread test)
void
setCoreThreads(int number)
Allows user to resize core pool size of the thread pool.void
setMaximumPoolSize(int newMaximumPoolSize)
Allows user to resize maximum size of the thread pool.void
setMaximumThreads(int number)
Allows user to resize maximum size of the thread pool.void
setThreadFactory(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:JMXEnabledThreadPoolExecutorMBean
Allows user to resize core pool size of the thread pool. Deprecated, use setCorePoolSize instead.- Specified by:
setCoreThreads
in interfaceJMXEnabledThreadPoolExecutorMBean
- Overrides:
setCoreThreads
in classJMXEnabledThreadPoolExecutor
-
setMaximumThreads
public void setMaximumThreads(int number)
Description copied from interface:JMXEnabledThreadPoolExecutorMBean
Allows user to resize maximum size of the thread pool. Deprecated, use setMaximumThreads instead.- Specified by:
setMaximumThreads
in interfaceJMXEnabledThreadPoolExecutorMBean
- Overrides:
setMaximumThreads
in classJMXEnabledThreadPoolExecutor
-
setMaximumPoolSize
public void setMaximumPoolSize(int newMaximumPoolSize)
Description copied from interface:ResizableThreadPool
Allows user to resize maximum size of the thread pool.- Specified by:
setMaximumPoolSize
in interfaceResizableThreadPool
- Overrides:
setMaximumPoolSize
in classJMXEnabledThreadPoolExecutor
-
isExecutedBy
public boolean isExecutedBy(java.lang.Thread test)
-
getThreadFactory
public org.apache.cassandra.concurrent.JMXEnabledSingleThreadExecutor.SingleThreadFactory getThreadFactory()
- Overrides:
getThreadFactory
in classjava.util.concurrent.ThreadPoolExecutor
-
setThreadFactory
public void setThreadFactory(java.util.concurrent.ThreadFactory threadFactory)
- Overrides:
setThreadFactory
in classjava.util.concurrent.ThreadPoolExecutor
-
-