public class ExecutorService.ExecutorConfig extends Object
ExecutorService.Executor
.Modifier and Type | Field and Description |
---|---|
private boolean |
allowCoreThreadTimeout |
private int |
corePoolSize |
private ExecutorType |
executorType |
static long |
KEEP_ALIVE_TIME_MILLIS_DEFAULT |
private long |
keepAliveTimeMillis |
Constructor and Description |
---|
ExecutorConfig() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowCoreThreadTimeout() |
int |
getCorePoolSize() |
private ExecutorType |
getExecutorType() |
long |
getKeepAliveTimeMillis() |
String |
getName()
Returns the executor name inferred from the type and the servername on which this is running.
|
ExecutorService.ExecutorConfig |
setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout)
Allows timing out of core threads.
|
ExecutorService.ExecutorConfig |
setCorePoolSize(int corePoolSize) |
ExecutorService.ExecutorConfig |
setExecutorType(ExecutorType type) |
ExecutorService.ExecutorConfig |
setKeepAliveTimeMillis(long keepAliveTimeMillis) |
public static final long KEEP_ALIVE_TIME_MILLIS_DEFAULT
private int corePoolSize
private boolean allowCoreThreadTimeout
private long keepAliveTimeMillis
private ExecutorType executorType
public ExecutorConfig()
public ExecutorService.ExecutorConfig setExecutorType(ExecutorType type)
private ExecutorType getExecutorType()
public int getCorePoolSize()
public ExecutorService.ExecutorConfig setCorePoolSize(int corePoolSize)
public boolean allowCoreThreadTimeout()
public ExecutorService.ExecutorConfig setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout)
ThreadPoolExecutor.allowCoreThreadTimeOut
for
additional details.public String getName()
public long getKeepAliveTimeMillis()
public ExecutorService.ExecutorConfig setKeepAliveTimeMillis(long keepAliveTimeMillis)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.