Example usage for Java java.util.concurrent Executors fields, constructors, methods, implement or subclass
The text is from its open source code.
Callable | callable(Runnable task) Returns a Callable object that, when called, runs the given task and returns null . |
Callable | callable(final PrivilegedAction> action) Returns a Callable object that, when called, runs the given privileged action and returns its result. |
Callable | callable(final PrivilegedExceptionAction> action) Returns a Callable object that, when called, runs the given privileged exception action and returns its result. |
Callable | callable(Runnable task, T result) Returns a Callable object that, when called, runs the given task and returns the given result. |
ThreadFactory | defaultThreadFactory() Returns a default thread factory used to create new threads. |
ExecutorService | newCachedThreadPool() Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available. |
ExecutorService | newCachedThreadPool(ThreadFactory threadFactory) Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available, and uses the provided ThreadFactory to create new threads when needed. |
ExecutorService | newFixedThreadPool(int nThreads) Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. |
ExecutorService | newFixedThreadPool(int nThreads, ThreadFactory threadFactory) Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue, using the provided ThreadFactory to create new threads when needed. |
ScheduledExecutorService | newScheduledThreadPool(int corePoolSize) Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically. |
ScheduledExecutorService | newScheduledThreadPool(int corePoolSize, ThreadFactory threadFactory) Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically. |
ExecutorService | newSingleThreadExecutor() Creates an Executor that uses a single worker thread operating off an unbounded queue. |
ExecutorService | newSingleThreadExecutor(ThreadFactory threadFactory) Creates an Executor that uses a single worker thread operating off an unbounded queue, and uses the provided ThreadFactory to create a new thread when needed. |
ScheduledExecutorService | newSingleThreadScheduledExecutor() Creates a single-threaded executor that can schedule commands to run after a given delay, or to execute periodically. |
ScheduledExecutorService | newSingleThreadScheduledExecutor(ThreadFactory threadFactory) Creates a single-threaded executor that can schedule commands to run after a given delay, or to execute periodically. |
ExecutorService | newWorkStealingPool(int parallelism) Creates a thread pool that maintains enough threads to support the given parallelism level, and may use multiple queues to reduce contention. |
ExecutorService | newWorkStealingPool() Creates a work-stealing thread pool using the number of Runtime#availableProcessors available processors as its target parallelism level. |
ScheduledExecutorService | unconfigurableScheduledExecutorService( ScheduledExecutorService executor) Returns an object that delegates all defined ScheduledExecutorService methods to the given executor, but not any other methods that might otherwise be accessible using casts. |