Class CompactionManager.ValidationExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor
-
- org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
-
- org.apache.cassandra.db.compaction.CompactionManager.ValidationExecutor
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
,JMXEnabledThreadPoolExecutorMBean
,LocalAwareExecutorService
,ResizableThreadPool
- Enclosing class:
- CompactionManager
public static class CompactionManager.ValidationExecutor 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 ValidationExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
adjustPoolSize()
void
afterExecute(java.lang.Runnable r, java.lang.Throwable t)
protected void
beforeExecute(java.lang.Thread t, java.lang.Runnable r)
com.google.common.util.concurrent.ListenableFuture<?>
submitIfRunning(java.lang.Runnable task, java.lang.String name)
<T> com.google.common.util.concurrent.ListenableFuture<T>
submitIfRunning(java.util.concurrent.Callable<T> task, java.lang.String name)
Submit the task but only if the executor has not been shutdown.If the executor has been shutdown, or in case of a rejected execution exception return a cancelled future.-
Methods inherited from class org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
getCoreThreads, getCurrentlyBlockedTasks, getMaximumThreads, getTotalBlockedTasks, onFinalAccept, onFinalRejection, onInitialRejection, setCoreThreads, setMaximumPoolSize, setMaximumThreads, shutdown, shutdownNow
-
Methods inherited from class org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor
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, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setRejectedExecutionHandler, setThreadFactory, 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
-
adjustPoolSize
public void adjustPoolSize()
-
beforeExecute
protected void beforeExecute(java.lang.Thread t, java.lang.Runnable r)
- Overrides:
beforeExecute
in classDebuggableThreadPoolExecutor
-
afterExecute
public void afterExecute(java.lang.Runnable r, java.lang.Throwable t)
- Overrides:
afterExecute
in classDebuggableThreadPoolExecutor
-
submitIfRunning
public com.google.common.util.concurrent.ListenableFuture<?> submitIfRunning(java.lang.Runnable task, java.lang.String name)
-
submitIfRunning
public <T> com.google.common.util.concurrent.ListenableFuture<T> submitIfRunning(java.util.concurrent.Callable<T> task, java.lang.String name)
Submit the task but only if the executor has not been shutdown.If the executor has been shutdown, or in case of a rejected execution exception return a cancelled future.- Parameters:
task
- - the task to submitname
- - the task name to use in log messages- Returns:
- the future that will deliver the task result, or a future that has already been cancelled if the task could not be submitted.
-
-