Class ThreadPoolExecutorBase

All Implemented Interfaces:
Executor, ExecutorService, ResizableThreadPool
Direct Known Subclasses:
ThreadPoolExecutorPlus

public class ThreadPoolExecutorBase extends ThreadPoolExecutor implements ResizableThreadPool
This class incorporates some Executor best practices for Cassandra. Most of the executors in the system should use or extend ThreadPoolExecutorPlus, or in rare exceptions this class. This class provides some very basic improvements:
  • We are configured by ThreadPoolExecutorBuilder
  • Tasks rejected due to overflow of the queue block the submitting thread rather than throwing RejectedExecutionException
  • RunnableFuture rejected due to executor shutdown will be cancelled
  • RunnableFuture removed by shutdownNow() will be cancelled We also provide a shutdown hook for JMX registration cleanup.