public class ExecutorConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Boolean |
DEFAULT_ALLOW_CORE_THREAD_TIMEOUT |
static java.lang.Boolean |
DEFAULT_BYPASS_IF_SYNCHRONOUS |
static java.lang.Integer |
DEFAULT_CORE_POOL_SIZE |
static java.lang.Long |
DEFAULT_KEEP_ALIVE_TIME |
static java.lang.Integer |
DEFAULT_MAXIMUM_POOL_SIZE |
static java.lang.Integer |
DEFAULT_QUEUE_SIZE |
static java.lang.Long |
DEFAULT_SHUTDOWN_DELAY |
static java.lang.Boolean |
DEFAULT_THREAD_DAEMON |
static java.lang.Integer |
DEFAULT_THREAD_PRIORITY |
| Constructor and Description |
|---|
ExecutorConfig()
default constructor needed by spring beans
|
ExecutorConfig(boolean isDefaultConfig,
ExecutorConfig parent)
creates a new executor config using the given parent
|
| Modifier and Type | Method and Description |
|---|---|
static ExecutorConfig |
create(java.util.Map<java.lang.String,java.lang.Object> options,
ExecutorConfig parent)
Create an ExecutorConfig instance based on the information in the options map.
|
java.lang.Integer |
getCorePoolSize() |
java.lang.Long |
getKeepAliveTime() |
java.lang.Integer |
getMaximumPoolSize() |
ExecutorConfig |
getParent() |
java.lang.Integer |
getQueueSize() |
java.lang.Long |
getShutdownDelay() |
java.lang.Integer |
getThreadPriority() |
java.lang.Boolean |
isAllowCoreThreadTimeOut() |
java.lang.Boolean |
isBypassIfSynchronous() |
java.lang.Boolean |
isThreadDaemon() |
void |
setAllowCoreThreadTimeOut(java.lang.Boolean allowCoreThreadTimeOut) |
void |
setBypassIfSynchronous(java.lang.Boolean bypassIfSynchronous) |
void |
setCorePoolSize(java.lang.Integer corePoolSize) |
void |
setKeepAliveTime(java.lang.Long keepAlive) |
void |
setMaximumPoolSize(java.lang.Integer maximumPoolSize) |
void |
setParent(ExecutorConfig parent) |
void |
setQueueSize(java.lang.Integer queueSize) |
void |
setShutdownDelay(java.lang.Long shutdownDelay) |
void |
setThreadDaemon(java.lang.Boolean threadDaemon) |
void |
setThreadPriority(java.lang.Integer threadPriority) |
public static final java.lang.Integer DEFAULT_CORE_POOL_SIZE
public static final java.lang.Integer DEFAULT_MAXIMUM_POOL_SIZE
public static final java.lang.Long DEFAULT_KEEP_ALIVE_TIME
public static final java.lang.Boolean DEFAULT_THREAD_DAEMON
public static final java.lang.Integer DEFAULT_THREAD_PRIORITY
public static final java.lang.Integer DEFAULT_QUEUE_SIZE
public static final java.lang.Long DEFAULT_SHUTDOWN_DELAY
public static final java.lang.Boolean DEFAULT_ALLOW_CORE_THREAD_TIMEOUT
public static final java.lang.Boolean DEFAULT_BYPASS_IF_SYNCHRONOUS
public ExecutorConfig()
public ExecutorConfig(boolean isDefaultConfig,
ExecutorConfig parent)
parent - the parent configpublic java.lang.Integer getCorePoolSize()
public void setCorePoolSize(java.lang.Integer corePoolSize)
corePoolSize - the corePoolSize to setpublic java.lang.Long getKeepAliveTime()
public void setKeepAliveTime(java.lang.Long keepAlive)
keepAlive - the keepAlive to setpublic java.lang.Integer getMaximumPoolSize()
public void setMaximumPoolSize(java.lang.Integer maximumPoolSize)
maximumPoolSize - the maximumPoolSize to setpublic java.lang.Integer getQueueSize()
public void setQueueSize(java.lang.Integer queueSize)
queueSize - the queueSize to setpublic java.lang.Boolean isThreadDaemon()
public void setThreadDaemon(java.lang.Boolean threadDaemon)
threadDaemon - the threadDaemon to setpublic java.lang.Integer getThreadPriority()
public void setThreadPriority(java.lang.Integer threadPriority)
threadPriority - the threadPriority to setpublic java.lang.Long getShutdownDelay()
public void setShutdownDelay(java.lang.Long shutdownDelay)
shutdownDelay - the shutdownDelay to setpublic java.lang.Boolean isAllowCoreThreadTimeOut()
public void setAllowCoreThreadTimeOut(java.lang.Boolean allowCoreThreadTimeOut)
allowCoreThreadTimeOut - the allowCoreThreadTimeOut to setpublic java.lang.Boolean isBypassIfSynchronous()
public void setBypassIfSynchronous(java.lang.Boolean bypassIfSynchronous)
bypassIfSynchronous - if synchronous tasks should bypass the executorpublic ExecutorConfig getParent()
public void setParent(ExecutorConfig parent)
public static ExecutorConfig create(java.util.Map<java.lang.String,java.lang.Object> options, ExecutorConfig parent)
options - the map of executor configuration options that will get set on the ExecutorConfig instanceparent - (optionally) the parent ExecutorConfig instanceCopyright © 2005-2014 FuseSource. All Rights Reserved.