public class ExecutorServices extends Object
| Modifier and Type | Method and Description |
|---|---|
static ExecutorService |
createFixedTimeoutExecutorService(int poolSize,
long keepAliveTime,
TimeUnit timeUnit)
Creates an executor service with a fixed pool size, that will time
out after a certain period of inactivity.
|
static ExecutorService |
createFixedTimeoutRethrowingExecutorService(int poolSize,
long keepAliveTime,
TimeUnit timeUnit,
boolean rethrowCancellation)
Creates an executor service with a fixed pool size, that will time
out after a certain period of inactivity.
|
public static ExecutorService createFixedTimeoutRethrowingExecutorService(int poolSize, long keepAliveTime, TimeUnit timeUnit, boolean rethrowCancellation)
poolSize - The core- and maximum pool sizekeepAliveTime - The keep alive timetimeUnit - The time unitrethrowCancellation - Whether CancellationExceptions should
also be re-thrownpublic static ExecutorService createFixedTimeoutExecutorService(int poolSize, long keepAliveTime, TimeUnit timeUnit)
poolSize - The core- and maximum pool sizekeepAliveTime - The keep alive timetimeUnit - The time unitCopyright © 2020. All rights reserved.