Package | Description |
---|---|
org.apache.cassandra.concurrent |
Modifier and Type | Class and Description |
---|---|
class |
ThreadPoolExecutorBuilder<E extends ExecutorPlus>
Configure a
ThreadPoolExecutorPlus , applying Cassandra's best practices by default
Core threads may timeout, and use a default ThreadPoolExecutorBuilder.keepAlive time in ThreadPoolExecutorBuilder.keepAliveUnits
Threads share the same ThreadGroup , which may be configurably a child of a specified ThreadGroup
descended from the same parent of the NamedThreadFactory.MetaFactory
By default queues are unbounded in length
The default RejectedExecutionHandler is implementation dependent, but may be overridden
The default Thread.UncaughtExceptionHandler is inherited from NamedThreadFactory.MetaFactory , which in turn receives it
from the ExecutorBuilderFactory |
Modifier and Type | Method and Description |
---|---|
ExecutorBuilder<? extends E> |
ExecutorBuilderFactory.configurePooled(java.lang.String name,
int threads)
Configure a pooled executor with the requested number of threads
|
ExecutorBuilder<ThreadPoolExecutorPlus> |
ExecutorFactory.Default.configurePooled(java.lang.String name,
int threads) |
ExecutorBuilder<? extends S> |
ExecutorBuilderFactory.configureSequential(java.lang.String name)
Configure a sequential (single threaded) executor
|
ExecutorBuilder<SingleThreadExecutorPlus> |
ExecutorFactory.Default.configureSequential(java.lang.String name) |
ExecutorBuilder<E> |
ExecutorBuilder.withDefaultThreadGroup()
Use the system default thread group for the threads we create.
|
ExecutorBuilder<E> |
ThreadPoolExecutorBuilder.withDefaultThreadGroup() |
ExecutorBuilder<E> |
ExecutorBuilder.withKeepAlive()
Core threads for the executor built by this factory will never timeout (default for single threaded builders).
|
ExecutorBuilder<E> |
ExecutorBuilder.withKeepAlive(long keepAlive,
java.util.concurrent.TimeUnit keepAliveUnits)
Threads for the executor built by this factory will timeout (terminate) after the specified period.
|
ExecutorBuilder<E> |
ExecutorBuilder.withQueueLimit(int queueLimit)
The executor built by this factory will limit the number of queued tasks; default is unlimited.
|
ExecutorBuilder<E> |
ExecutorBuilder.withRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
Set the
RejectedExecutionHandler for the executor built by this factory. |
ExecutorBuilder<E> |
ExecutorBuilder.withThreadGroup(java.lang.ThreadGroup threadGroup)
Threads for the executor built by this factory will all be (transitively) members of
threadGroup ,
but may directly reside in a child thread group. |
ExecutorBuilder<E> |
ThreadPoolExecutorBuilder.withThreadGroup(java.lang.ThreadGroup threadGroup) |
ExecutorBuilder<E> |
ExecutorBuilder.withThreadPriority(int threadPriority)
Specify the priority of threads that service the executor built by this factory (default to
Thread.NORM_PRIORITY ) |
ExecutorBuilder<E> |
ExecutorBuilder.withUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Set the
Thread.UncaughtExceptionHandler for threads that service executors built by this factory. |
Copyright © 2009- The Apache Software Foundation