| Package | Description |
|---|---|
| java.nio.channels | 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. |
| java.nio.channels.spi | Service-provider classes for the java.nio.channels package. |
| java.nio.file.spi | Service-provider classes for the java.nio.file package. |
| java.util.concurrent | Utility classes commonly useful in concurrent programming. |
| Modifier and Type | Method | Description |
|---|---|---|
staticAsynchronousFileChannel | AsynchronousFileChannel.open(Path file,Set<? extendsOpenOption> options,ExecutorService executor,FileAttribute<?>... attrs)Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file. | |
staticAsynchronousChannelGroup | AsynchronousChannelGroup.withCachedThreadPool(ExecutorService executor, int initialSize)Creates an asynchronous channel group with a given thread pool that creates new threads as needed. | |
staticAsynchronousChannelGroup | AsynchronousChannelGroup.withThreadPool(ExecutorService executor)Creates an asynchronous channel group with a given thread pool. |
| Modifier and Type | Method | Description |
|---|---|---|
abstractAsynchronousChannelGroup | AsynchronousChannelProvider.openAsynchronousChannelGroup(ExecutorService executor, int initialSize)Constructs a new asynchronous channel group with the given thread pool. |
| Modifier and Type | Method | Description |
|---|---|---|
AsynchronousFileChannel | FileSystemProvider.newAsynchronousFileChannel(Path path,Set<? extendsOpenOption> options,ExecutorService executor,FileAttribute<?>... attrs)Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file. |
| Modifier and Type | Interface | Description |
|---|---|---|
interface | ScheduledExecutorServiceAn ExecutorService that can schedule commands to run after a given delay, or to execute periodically. |
| Modifier and Type | Class | Description |
|---|---|---|
class | AbstractExecutorServiceProvides default implementations of ExecutorService execution methods. | |
class | ForkJoinPoolAn ExecutorService for runningForkJoinTasks. | |
class | ScheduledThreadPoolExecutorA ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically. | |
class | ThreadPoolExecutorAn ExecutorService that executes each submitted task using one of possibly several pooled threads, normally configured usingExecutors factory methods. |
| Modifier and Type | Method | Description |
|---|---|---|
staticExecutorService | Executors.newCachedThreadPool()Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available. | |
staticExecutorService | Executors.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. | |
staticExecutorService | Executors.newFixedThreadPool(int nThreads)Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. | |
staticExecutorService | Executors.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. | |
staticExecutorService | Executors.newSingleThreadExecutor()Creates an Executor that uses a single worker thread operating off an unbounded queue. | |
staticExecutorService | Executors.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. | |
staticExecutorService | Executors.newWorkStealingPool()Creates a work-stealing thread pool using all available processors as its target parallelism level. | |
staticExecutorService | Executors.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. | |
staticExecutorService | Executors.unconfigurableExecutorService(ExecutorService executor)Returns an object that delegates all defined ExecutorService methods to the given executor, but not any other methods that might otherwise be accessible using casts. |
| Modifier and Type | Method | Description |
|---|---|---|
staticExecutorService | Executors.unconfigurableExecutorService(ExecutorService executor)Returns an object that delegates all defined ExecutorService methods to the given executor, but not any other methods that might otherwise be accessible using casts. |