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
EventThreadPoolConfigurationimplementation that creates configuration forThreadPoolExecutorbased on cpus available.It's possible to override this behaviour via
CORE_POOL_SIZE_KEY,MAXIMUM_POOL_SIZE_KEY,QUEUE_SIZE_KEYsystem properties- Since:
- 5.5
-
-
Field Summary
Fields Modifier and Type Field Description static StringCORE_POOL_SIZE_KEYstatic StringMAXIMUM_POOL_SIZE_KEYprotected static intQUEUE_SIZESize ofThreadPoolExecutor.workQueuestatic StringQUEUE_SIZE_KEY
-
Constructor Summary
Constructors Constructor Description CpuBasedThreadPoolConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCorePoolSize()longgetKeepAliveTime()intgetMaximumPoolSize()intgetQueueSize()TimeUnitgetTimeUnit()
-
-
-
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:
getCorePoolSizein interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getMaximumPoolSize
public int getMaximumPoolSize()
- Specified by:
getMaximumPoolSizein interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getKeepAliveTime
public long getKeepAliveTime()
- Specified by:
getKeepAliveTimein interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getTimeUnit
public TimeUnit getTimeUnit()
- Specified by:
getTimeUnitin interfacecom.atlassian.event.config.EventThreadPoolConfiguration
-
getQueueSize
public int getQueueSize()
-
-