Package org.apache.cassandra.concurrent
Interface LocalAwareExecutorService
-
- All Superinterfaces:
java.util.concurrent.Executor,java.util.concurrent.ExecutorService,ResizableThreadPool
- All Known Implementing Classes:
AbstractLocalAwareExecutorService,CompactionManager.ValidationExecutor,DebuggableThreadPoolExecutor,ImmediateExecutor,JMXEnabledSingleThreadExecutor,JMXEnabledThreadPoolExecutor,SEPExecutor
public interface LocalAwareExecutorService extends java.util.concurrent.ExecutorService, ResizableThreadPool
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLocalAwareExecutorService.MaximumPoolSizeListener
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidexecute(java.lang.Runnable command, ExecutorLocals locals)intgetActiveTaskCount()Returns the approximate number of threads that are actively executing tasks.longgetCompletedTaskCount()Returns the approximate total number of tasks that have completed execution.default intgetMaxTasksQueued()intgetPendingTaskCount()Returns the approximate total of tasks waiting to be executed.voidmaybeExecuteImmediately(java.lang.Runnable command)-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
Methods inherited from interface org.apache.cassandra.concurrent.ResizableThreadPool
getCorePoolSize, getMaximumPoolSize, setCorePoolSize, setMaximumPoolSize
-
-
-
-
Method Detail
-
execute
void execute(java.lang.Runnable command, ExecutorLocals locals)
-
maybeExecuteImmediately
void maybeExecuteImmediately(java.lang.Runnable command)
-
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, but one that does not ever decrease across successive calls.- Returns:
- the number of tasks
-
getMaxTasksQueued
default int getMaxTasksQueued()
-
-