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 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
- Since:
- 5.5
-
Field Details
-
CORE_POOL_SIZE_KEY
- See Also:
-
MAXIMUM_POOL_SIZE_KEY
- See Also:
-
QUEUE_SIZE_KEY
- See Also:
-
QUEUE_SIZE
protected static final int QUEUE_SIZESize ofThreadPoolExecutor.workQueue
-
-
Constructor Details
-
CpuBasedThreadPoolConfiguration
public CpuBasedThreadPoolConfiguration()
-
-
Method Details
-
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
- Specified by:
getTimeUnit
in interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getQueueSize
public int getQueueSize()
-