Class AsyncTaskExecutorConfiguration
- java.lang.Object
-
- org.flowable.common.engine.impl.async.AsyncTaskExecutorConfiguration
-
public class AsyncTaskExecutorConfiguration extends Object
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowCoreThreadTimeoutWhether core threads can time out (which is needed to scale down the threads)protected DurationawaitTerminationPeriodThe time that is waited to gracefully shut down the thread pool used for job executionprotected intcorePoolSizeThe minimal number of threads that are kept alive in the thread pool for job executionprotected DurationkeepAliveThe time a thread used for job execution must be kept alive before it is destroyed.protected intmaxPoolSizeThe maximum number of threads that are kept alive in the thread pool for job executionprotected intqueueSizeThe size of the queue on which jobs to be executed are placedprotected StringthreadPoolNamingPatternThe naming pattern for the thread pool threads.
-
Constructor Summary
Constructors Constructor Description AsyncTaskExecutorConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DurationgetAwaitTerminationPeriod()intgetCorePoolSize()DurationgetKeepAlive()intgetMaxPoolSize()intgetQueueSize()StringgetThreadPoolNamingPattern()booleanisAllowCoreThreadTimeout()voidsetAllowCoreThreadTimeout(boolean allowCoreThreadTimeout)voidsetAwaitTerminationPeriod(Duration awaitTerminationPeriod)voidsetCorePoolSize(int corePoolSize)voidsetKeepAlive(Duration keepAlive)voidsetMaxPoolSize(int maxPoolSize)voidsetQueueSize(int queueSize)voidsetThreadNamePrefix(String prefix)voidsetThreadPoolNamingPattern(String threadPoolNamingPattern)
-
-
-
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.
-
-
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)
-
-