Package org.apache.cassandra.concurrent
Interface ResizableThreadPool
-
- All Known Subinterfaces:
ExecutorPlus
,LocalAwareExecutorPlus
,LocalAwareSequentialExecutorPlus
,ResizableThreadPoolMXBean
,ScheduledExecutorPlus
,SEPExecutorMBean
,SequentialExecutorPlus
- All Known Implementing Classes:
CompactionManager.ValidationExecutor
,ImmediateExecutor
,LocalAwareSingleThreadExecutorPlus
,LocalAwareThreadPoolExecutorPlus
,ScheduledThreadPoolExecutorPlus
,SEPExecutor
,SingleThreadExecutorPlus
,ThreadPoolExecutorBase
,ThreadPoolExecutorJMXAdapter
,ThreadPoolExecutorPlus
,WrappedExecutorPlus
public interface ResizableThreadPool
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
getActiveTaskCount()
Returns the approximate number of threads that are actively executing tasks.long
getCompletedTaskCount()
Returns the approximate total number of tasks that have completed execution.int
getCorePoolSize()
Returns core pool size of thread pool, the minimum number of workers (where that makes sense for a thread pool, SEPExecutor does not have a minimum size).int
getMaximumPoolSize()
Returns maximum pool size of thread pool.default int
getMaxTasksQueued()
int
getPendingTaskCount()
Returns the approximate total of tasks waiting to be executed.default long
oldestTaskQueueTime()
void
setCorePoolSize(int newCorePoolSize)
Allows user to resize minimum size of the thread pool.void
setMaximumPoolSize(int newMaximumPoolSize)
Allows user to resize maximum size of the thread pool.
-
-
-
Method Detail
-
getCorePoolSize
int getCorePoolSize()
Returns core pool size of thread pool, the minimum number of workers (where that makes sense for a thread pool, SEPExecutor does not have a minimum size).
-
setCorePoolSize
void setCorePoolSize(int newCorePoolSize)
Allows user to resize minimum size of the thread pool.
-
getMaximumPoolSize
int getMaximumPoolSize()
Returns maximum pool size of thread pool.
-
setMaximumPoolSize
void setMaximumPoolSize(int newMaximumPoolSize)
Allows user to resize maximum size of the thread pool.
-
getActiveTaskCount
int getActiveTaskCount()
Returns the approximate number of threads that are actively executing tasks.- Returns:
- the number of threads
-
getCompletedTaskCount
long getCompletedTaskCount()
Returns the approximate total number of tasks that have completed execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation, but one that does not ever decrease across successive calls.- Returns:
- the number of tasks
-
getPendingTaskCount
int getPendingTaskCount()
Returns the approximate total of tasks waiting to be executed. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation.- Returns:
- the number of tasks
-
getMaxTasksQueued
default int getMaxTasksQueued()
-
oldestTaskQueueTime
default long oldestTaskQueueTime()
-
-