Package org.apache.camel.main
Class ThreadPoolConfigurationProperties
- java.lang.Object
-
- org.apache.camel.main.ThreadPoolConfigurationProperties
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.camel.spi.BootstrapCloseable
@Configurer(bootstrap=true) public class ThreadPoolConfigurationProperties extends Object implements org.apache.camel.spi.BootstrapCloseable
Global configuration for thread pools
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolConfigurationProperties(MainConfigurationProperties parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadPoolConfigurationProperties
addConfig(String id, ThreadPoolProfileConfigurationProperties config)
Adds a configuration for a specific thread pool profile (inherits default values)void
close()
MainConfigurationProperties
end()
Boolean
getAllowCoreThreadTimeOut()
Map<String,ThreadPoolProfileConfigurationProperties>
getConfig()
Long
getKeepAliveTime()
Integer
getMaxPoolSize()
Integer
getMaxQueueSize()
Integer
getPoolSize()
org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy
getRejectedPolicy()
TimeUnit
getTimeUnit()
void
setAllowCoreThreadTimeOut(Boolean allowCoreThreadTimeOut)
Sets default whether to allow core threads to timeoutvoid
setConfig(Map<String,ThreadPoolProfileConfigurationProperties> config)
Adds a configuration for a specific thread pool profile (inherits default values)void
setKeepAliveTime(Long keepAliveTime)
Sets the default keep alive time for inactive threadsvoid
setMaxPoolSize(Integer maxPoolSize)
Sets the default maximum pool sizevoid
setMaxQueueSize(Integer maxQueueSize)
Sets the default maximum number of tasks in the work queue.void
setPoolSize(Integer poolSize)
Sets the default core pool size (threads to keep minimum in pool)void
setRejectedPolicy(org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy rejectedPolicy)
Sets the default handler for tasks which cannot be executed by the thread pool.void
setTimeUnit(TimeUnit timeUnit)
Sets the default time unit used for keep alive time
-
-
-
Constructor Detail
-
ThreadPoolConfigurationProperties
public ThreadPoolConfigurationProperties(MainConfigurationProperties parent)
-
-
Method Detail
-
end
public MainConfigurationProperties end()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getPoolSize
public Integer getPoolSize()
-
setPoolSize
public void setPoolSize(Integer poolSize)
Sets the default core pool size (threads to keep minimum in pool)
-
getMaxPoolSize
public Integer getMaxPoolSize()
-
setMaxPoolSize
public void setMaxPoolSize(Integer maxPoolSize)
Sets the default maximum pool size
-
getKeepAliveTime
public Long getKeepAliveTime()
-
setKeepAliveTime
public void setKeepAliveTime(Long keepAliveTime)
Sets the default keep alive time for inactive threads
-
getTimeUnit
public TimeUnit getTimeUnit()
-
setTimeUnit
public void setTimeUnit(TimeUnit timeUnit)
Sets the default time unit used for keep alive time
-
getMaxQueueSize
public Integer getMaxQueueSize()
-
setMaxQueueSize
public void setMaxQueueSize(Integer maxQueueSize)
Sets the default maximum number of tasks in the work queue. Use -1 or an unbounded queue
-
getAllowCoreThreadTimeOut
public Boolean getAllowCoreThreadTimeOut()
-
setAllowCoreThreadTimeOut
public void setAllowCoreThreadTimeOut(Boolean allowCoreThreadTimeOut)
Sets default whether to allow core threads to timeout
-
getRejectedPolicy
public org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy getRejectedPolicy()
-
setRejectedPolicy
public void setRejectedPolicy(org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy rejectedPolicy)
Sets the default handler for tasks which cannot be executed by the thread pool.
-
getConfig
public Map<String,ThreadPoolProfileConfigurationProperties> getConfig()
-
setConfig
public void setConfig(Map<String,ThreadPoolProfileConfigurationProperties> config)
Adds a configuration for a specific thread pool profile (inherits default values)
-
addConfig
public ThreadPoolConfigurationProperties addConfig(String id, ThreadPoolProfileConfigurationProperties config)
Adds a configuration for a specific thread pool profile (inherits default values)
-
-