Package com.atlassian.confluence.event
Class CpuBasedThreadPoolConfiguration
- java.lang.Object
-
- com.atlassian.confluence.event.CpuBasedThreadPoolConfiguration
-
- All Implemented Interfaces:
com.atlassian.event.config.EventThreadPoolConfiguration
public class CpuBasedThreadPoolConfiguration extends Object implements com.atlassian.event.config.EventThreadPoolConfiguration
EventThreadPoolConfiguration
implementation that creates configuration forThreadPoolExecutor
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- Since:
- 5.5
-
-
Field Summary
Fields Modifier and Type Field Description static String
CORE_POOL_SIZE_KEY
static String
MAXIMUM_POOL_SIZE_KEY
protected static int
QUEUE_SIZE
Size ofThreadPoolExecutor.workQueue
static String
QUEUE_SIZE_KEY
-
Constructor Summary
Constructors Constructor Description CpuBasedThreadPoolConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCorePoolSize()
long
getKeepAliveTime()
int
getMaximumPoolSize()
int
getQueueSize()
TimeUnit
getTimeUnit()
-
-
-
Field Detail
-
CORE_POOL_SIZE_KEY
public static final String CORE_POOL_SIZE_KEY
- See Also:
- Constant Field Values
-
MAXIMUM_POOL_SIZE_KEY
public static final String MAXIMUM_POOL_SIZE_KEY
- See Also:
- Constant Field Values
-
QUEUE_SIZE_KEY
public static final String QUEUE_SIZE_KEY
- See Also:
- Constant Field Values
-
QUEUE_SIZE
protected static final int QUEUE_SIZE
Size ofThreadPoolExecutor.workQueue
-
-
Method Detail
-
getCorePoolSize
public int getCorePoolSize()
- Specified by:
getCorePoolSize
in interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getMaximumPoolSize
public int getMaximumPoolSize()
- Specified by:
getMaximumPoolSize
in interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getKeepAliveTime
public long getKeepAliveTime()
- Specified by:
getKeepAliveTime
in interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getTimeUnit
public TimeUnit getTimeUnit()
- Specified by:
getTimeUnit
in interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getQueueSize
public int getQueueSize()
-
-