Package com.helger.commons.concurrent
Interface IExecutorServiceFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Factory for creating
ExecutorService instances.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiongetExecutorService(int nParallelTasks) Get anExecutorServicefor the given number of parallel tasks.
-
Method Details
-
getExecutorService
Get anExecutorServicefor the given number of parallel tasks. It is up to the implementation to interpret the value or not. The number of parallel tasks can therefore considered a hint to the implementation.- Parameters:
nParallelTasks- The number of parallel tasks to perform. Needs to be > 0.- Returns:
- A non-
nullExecutorServiceobject.
-