Class 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
    • Constructor Detail

      • CpuBasedThreadPoolConfiguration

        public CpuBasedThreadPoolConfiguration()
    • Method Detail

      • getCorePoolSize

        public int getCorePoolSize()
        Specified by:
        getCorePoolSize in interface com.atlassian.event.config.EventThreadPoolConfiguration
      • getMaximumPoolSize

        public int getMaximumPoolSize()
        Specified by:
        getMaximumPoolSize in interface com.atlassian.event.config.EventThreadPoolConfiguration
      • getKeepAliveTime

        public long getKeepAliveTime()
        Specified by:
        getKeepAliveTime in interface com.atlassian.event.config.EventThreadPoolConfiguration
      • getTimeUnit

        public TimeUnit getTimeUnit()
        Specified by:
        getTimeUnit in interface com.atlassian.event.config.EventThreadPoolConfiguration
      • getQueueSize

        public int getQueueSize()