Class JDKExecutorServiceFactory
java.lang.Object
space.arim.omnibus.util.concurrent.impl.JDKExecutorServiceFactory
- All Implemented Interfaces:
ExecutorServiceFactory
An
ExecutorServiceFactory which uses the JDK executor implementations
returned from Executors-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates an executor service backed by a cached thread poolnewCachedThreadPool(ThreadFactory threadFactory) Creates an executor service backed by a cached thread poolnewFixedThreadPool(int threadCount) Creates an executor service backed by a fixed number of threadsnewFixedThreadPool(int threadCount, ThreadFactory threadFactory) Creates an executor service backed by a fixed number of threads
-
Constructor Details
-
JDKExecutorServiceFactory
public JDKExecutorServiceFactory()
-
-
Method Details
-
newFixedThreadPool
Description copied from interface:ExecutorServiceFactoryCreates an executor service backed by a fixed number of threads- Specified by:
newFixedThreadPoolin interfaceExecutorServiceFactory- Parameters:
threadCount- the thread count- Returns:
- the executor service
-
newFixedThreadPool
Description copied from interface:ExecutorServiceFactoryCreates an executor service backed by a fixed number of threads- Specified by:
newFixedThreadPoolin interfaceExecutorServiceFactory- Parameters:
threadCount- the thread countthreadFactory- the thread factory- Returns:
- the executor service
-
newCachedThreadPool
Description copied from interface:ExecutorServiceFactoryCreates an executor service backed by a cached thread pool- Specified by:
newCachedThreadPoolin interfaceExecutorServiceFactory- Returns:
- the executor service
-
newCachedThreadPool
Description copied from interface:ExecutorServiceFactoryCreates an executor service backed by a cached thread pool- Specified by:
newCachedThreadPoolin interfaceExecutorServiceFactory- Parameters:
threadFactory- the thread factory- Returns:
- the executor service
-