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.workQueue
public int getCorePoolSize()
getCorePoolSize
in interface com.atlassian.event.config.EventThreadPoolConfiguration
public int getMaximumPoolSize()
getMaximumPoolSize
in interface com.atlassian.event.config.EventThreadPoolConfiguration
public long getKeepAliveTime()
getKeepAliveTime
in interface com.atlassian.event.config.EventThreadPoolConfiguration
public TimeUnit getTimeUnit()
getTimeUnit
in interface com.atlassian.event.config.EventThreadPoolConfiguration
Copyright © 2003–2015 Atlassian. All rights reserved.