Package org.apache.cassandra.concurrent
package org.apache.cassandra.concurrent
-
ClassDescriptionInterface to include on a Runnable or Callable submitted to the
SharedExecutorPoolto provide more detailed diagnostics.Wraps aDebuggableTaskto include the name of the thread running it.Standardised handling of failures during execution - mostly this involves invoking a thread'sThread.UncaughtExceptionHandlerorJVMStabilityInspector.uncaughtException(Thread, Throwable), with special handling forCompactionInterruptedException.ExecutorBuilder<E extends ExecutorService>Configure an executor before creating it.Entry point for configuring and creating new executors.Entry point for configuring and creating new executors.Entry point for configuring and creating new executors.Cassandra's extension ofExecutorService, using our ownFuture, supportingExecutorPlus.inExecutor(), and execution with associated resourcesExecutorPlus.execute(WithResources, Runnable)(which is primarily used for encapsulatingExecutorLocalswithout leaking implementing classes).FutureTask<V>A FutureTask that utilises Cassandra'sAsyncFuture, making it compatible withExecutorPlus.A FutureTask that utilises Cassandra'sAsyncFuture, making it compatible withExecutorPlus.A Task that only runs on NORMAL statesAnExecutorPlusthat is aware of, and propagates to execution, any ExecutorLocalsASequentialExecutorPlusthat is aware of, and propagates to execution, any ExecutorLocalsThis class is an implementation of the ThreadFactory interface.Centralized location for shared executorsLike ExecutorPlus, ScheduledThreadPoolExecutorPlus always logs exceptions from the tasks it is given, even if Future.get is never called elsewhere.AnExecutorPlusthat guarantees the order of execution matches the order of task submission, and provides a simple mechanism for the recurring pattern of ensuring a job is executed at least once after some point in time (i.e.A pool of worker threads that are shared between all Executors created with it.A simple mechanism to impose our desired semantics on the execution of a task without requiring a specialised executor service.This class incorporates some Executor best practices for Cassandra.ThreadPoolExecutorBuilder<E extends ExecutorPlus>Configure aThreadPoolExecutorPlus, applying Cassandra's best practices by default Core threads may timeout, and use a defaultThreadPoolExecutorBuilder.keepAlivetime inThreadPoolExecutorBuilder.keepAliveUnitsThreads share the sameThreadGroup, which may be configurably a child of a specifiedThreadGroupdescended from the same parent of theNamedThreadFactory.MetaFactoryBy default queues are unbounded in length The defaultRejectedExecutionHandleris implementation dependent, but may be overridden The defaultThread.UncaughtExceptionHandleris inherited fromNamedThreadFactory.MetaFactory, which in turn receives it from theExecutorBuilderFactoryAThreadPoolExecutorBaseadapter to expose it via JMX.This class inherits Executor best practices fromThreadPoolExecutorBaseandThreadPoolExecutorBuilder.