public class CpuBasedThreadPoolConfiguration extends Object implements com.atlassian.event.config.EventThreadPoolConfiguration
EventThreadPoolConfiguration implementation that creates configuration for
ThreadPoolExecutor based on cpus available.
It's possible to override this behaviour via
CORE_POOL_SIZE_KEY, MAXIMUM_POOL_SIZE_KEY, QUEUE_SIZE_KEY
system properties
| Modifier and Type | Field and Description |
|---|---|
static String |
CORE_POOL_SIZE_KEY |
static String |
MAXIMUM_POOL_SIZE_KEY |
protected static int |
QUEUE_SIZE
Size of
ThreadPoolExecutor.workQueue |
static String |
QUEUE_SIZE_KEY |
| Constructor and Description |
|---|
CpuBasedThreadPoolConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCorePoolSize() |
long |
getKeepAliveTime() |
int |
getMaximumPoolSize() |
TimeUnit |
getTimeUnit() |
public static final String CORE_POOL_SIZE_KEY
public static final String MAXIMUM_POOL_SIZE_KEY
public static final String QUEUE_SIZE_KEY
protected static final int QUEUE_SIZE
ThreadPoolExecutor.workQueuepublic int getCorePoolSize()
getCorePoolSize in interface com.atlassian.event.config.EventThreadPoolConfigurationpublic int getMaximumPoolSize()
getMaximumPoolSize in interface com.atlassian.event.config.EventThreadPoolConfigurationpublic long getKeepAliveTime()
getKeepAliveTime in interface com.atlassian.event.config.EventThreadPoolConfigurationpublic TimeUnit getTimeUnit()
getTimeUnit in interface com.atlassian.event.config.EventThreadPoolConfigurationCopyright © 2003–2018 Atlassian. All rights reserved.