Package de.galan.commons.util
Class Concurrents
- java.lang.Object
-
- de.galan.commons.util.Concurrents
-
public class Concurrents extends Object
Concurrent utilities.
-
-
Constructor Summary
Constructors Constructor Description Concurrents()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExecutorServicenewBoundedExecutor(int threads, int queueSize)Construct a new ExecutorService with a fixed amount of threads.
-
-
-
Method Detail
-
newBoundedExecutor
public static ExecutorService newBoundedExecutor(int threads, int queueSize)
Construct a new ExecutorService with a fixed amount of threads. Invoker can submit tasks to service until queueSize has reached limit. In that case the invoker gets blocked until the queueSize shrinks.
-
-