Class AsyncTaskExecutorConfiguration


  • public class AsyncTaskExecutorConfiguration
    extends Object
    Author:
    Filip Hrisafov
    • Field Detail

      • corePoolSize

        protected int corePoolSize
        The minimal number of threads that are kept alive in the thread pool for job execution
      • maxPoolSize

        protected int maxPoolSize
        The maximum number of threads that are kept alive in the thread pool for job execution
      • keepAlive

        protected Duration keepAlive
        The time a thread used for job execution must be kept alive before it is destroyed. Default setting is 5 seconds. Having a non-default setting of 0 takes resources, but in the case of many job executions it avoids creating new threads all the time.
      • queueSize

        protected int queueSize
        The size of the queue on which jobs to be executed are placed
      • allowCoreThreadTimeout

        protected boolean allowCoreThreadTimeout
        Whether core threads can time out (which is needed to scale down the threads)
      • awaitTerminationPeriod

        protected Duration awaitTerminationPeriod
        The time that is waited to gracefully shut down the thread pool used for job execution
      • threadPoolNamingPattern

        protected String threadPoolNamingPattern
        The naming pattern for the thread pool threads.
    • Constructor Detail

      • AsyncTaskExecutorConfiguration

        public AsyncTaskExecutorConfiguration()
    • Method Detail

      • getCorePoolSize

        public int getCorePoolSize()
      • setCorePoolSize

        public void setCorePoolSize​(int corePoolSize)
      • getMaxPoolSize

        public int getMaxPoolSize()
      • setMaxPoolSize

        public void setMaxPoolSize​(int maxPoolSize)
      • getKeepAlive

        public Duration getKeepAlive()
      • setKeepAlive

        public void setKeepAlive​(Duration keepAlive)
      • getQueueSize

        public int getQueueSize()
      • setQueueSize

        public void setQueueSize​(int queueSize)
      • isAllowCoreThreadTimeout

        public boolean isAllowCoreThreadTimeout()
      • setAllowCoreThreadTimeout

        public void setAllowCoreThreadTimeout​(boolean allowCoreThreadTimeout)
      • getAwaitTerminationPeriod

        public Duration getAwaitTerminationPeriod()
      • setAwaitTerminationPeriod

        public void setAwaitTerminationPeriod​(Duration awaitTerminationPeriod)
      • getThreadPoolNamingPattern

        public String getThreadPoolNamingPattern()
      • setThreadPoolNamingPattern

        public void setThreadPoolNamingPattern​(String threadPoolNamingPattern)
      • setThreadNamePrefix

        public void setThreadNamePrefix​(String prefix)