Class DaemonExecutors
java.lang.Object
com.pnfsoftware.jeb.util.concurrent.DaemonExecutors
Static routines to create daemon thread pools. Mirrors
Executors.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorServiceCreate a cached daemon-thread executor service.static ExecutorServicenewFixedThreadPool(int nThreads) Create a fixed-size daemon-thread executor service.static ExecutorServiceCreate a single daemon-thread executor service.
-
Constructor Details
-
DaemonExecutors
public DaemonExecutors()
-
-
Method Details
-
newCachedThreadPool
Create a cached daemon-thread executor service.- Returns:
- a cached thread pool whose worker threads are daemon threads
-
newFixedThreadPool
Create a fixed-size daemon-thread executor service.- Parameters:
nThreads- number of worker threads- Returns:
- a fixed thread pool whose worker threads are daemon threads
-
newSingleThreadExecutor
Create a single daemon-thread executor service.- Returns:
- a single-thread executor whose worker thread is a daemon thread
-