java.util.concurrent · java.base · since Java 1.5
Executors
public class ExecutorsFactory methods for standard executor configurations — fixed pools, scheduled pools, single-thread serializers, and the Java 21 virtual-thread-per-task executor.
Key methods
static ExecutorService newFixedThreadPool(int n) | N threads, UNBOUNDED queue — mind overload behavior. |
static ExecutorService newVirtualThreadPerTaskExecutor() | One cheap virtual thread per task (Java 21) — the I/O-workload default. |
static ScheduledExecutorService newScheduledThreadPool(int n) | Delayed and periodic tasks. |
static ExecutorService newSingleThreadExecutor() | Serialized execution — an actor-lite. |
static ExecutorService newCachedThreadPool() | Unbounded thread growth — dangerous under load; largely superseded. |