Uses of Interface
java.util.concurrent.ExecutorService
Packages that use ExecutorService
Package
Description
Defines channels, which represent connections to entities that are capable of
performing I/O operations, such as files and sockets; defines selectors, for
multiplexed, non-blocking I/O operations.
Service-provider classes for the
java.nio.channels
package.Service-provider classes for the
java.nio.file package.Utility classes commonly useful in concurrent programming.
-
Uses of ExecutorService in java.nio.channels
Methods in java.nio.channels with parameters of type ExecutorServiceModifier and TypeMethodDescriptionstatic AsynchronousFileChannelAsynchronousFileChannel.open(Path file, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file.static AsynchronousChannelGroupAsynchronousChannelGroup.withCachedThreadPool(ExecutorService executor, int initialSize) Creates an asynchronous channel group with a given thread pool that creates new threads as needed.static AsynchronousChannelGroupAsynchronousChannelGroup.withThreadPool(ExecutorService executor) Creates an asynchronous channel group with a given thread pool. -
Uses of ExecutorService in java.nio.channels.spi
Methods in java.nio.channels.spi with parameters of type ExecutorServiceModifier and TypeMethodDescriptionabstract AsynchronousChannelGroupAsynchronousChannelProvider.openAsynchronousChannelGroup(ExecutorService executor, int initialSize) Constructs a new asynchronous channel group with the given thread pool. -
Uses of ExecutorService in java.nio.file.spi
Methods in java.nio.file.spi with parameters of type ExecutorServiceModifier and TypeMethodDescriptionFileSystemProvider.newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file. -
Uses of ExecutorService in java.util.concurrent
Subinterfaces of ExecutorService in java.util.concurrentModifier and TypeInterfaceDescriptioninterfaceAnExecutorServicethat can schedule commands to run after a given delay, or to execute periodically.Classes in java.util.concurrent that implement ExecutorServiceModifier and TypeClassDescriptionclassProvides default implementations ofExecutorServiceexecution methods.classAnExecutorServicefor runningForkJoinTasks.classAThreadPoolExecutorthat can additionally schedule commands to run after a given delay, or to execute periodically.classAnExecutorServicethat executes each submitted task using one of possibly several pooled threads, normally configured usingExecutorsfactory methods.Methods in java.util.concurrent that return ExecutorServiceModifier and TypeMethodDescriptionstatic ExecutorServiceExecutors.newCachedThreadPool()Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available.static ExecutorServiceExecutors.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.static ExecutorServiceExecutors.newFixedThreadPool(int nThreads) Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue.static ExecutorServiceExecutors.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.static ExecutorServiceExecutors.newSingleThreadExecutor()Creates an Executor that uses a single worker thread operating off an unbounded queue.static ExecutorServiceExecutors.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.static ExecutorServiceExecutors.newThreadPerTaskExecutor(ThreadFactory threadFactory) Creates an Executor that starts a new Thread for each task.static ExecutorServiceExecutors.newVirtualThreadPerTaskExecutor()Creates an Executor that starts a new virtual Thread for each task.static ExecutorServiceExecutors.newWorkStealingPool()Creates a work-stealing thread pool using the number of available processors as its target parallelism level.static ExecutorServiceExecutors.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.static ExecutorServiceExecutors.unconfigurableExecutorService(ExecutorService executor) Returns an object that delegates all definedExecutorServicemethods to the given executor, but not any other methods that might otherwise be accessible using casts.Methods in java.util.concurrent with parameters of type ExecutorServiceModifier and TypeMethodDescriptionstatic ExecutorServiceExecutors.unconfigurableExecutorService(ExecutorService executor) Returns an object that delegates all definedExecutorServicemethods to the given executor, but not any other methods that might otherwise be accessible using casts.