Class ThreadPoolProfileDefinition

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="configuration") public class ThreadPoolProfileDefinition extends OptionalIdentifiedDefinition<ThreadPoolProfileDefinition>
To configure thread pools
  • Constructor Details

    • ThreadPoolProfileDefinition

      public ThreadPoolProfileDefinition()
  • Method Details

    • getShortName

      public String getShortName()
    • getLabel

      public String getLabel()
    • poolSize

      public ThreadPoolProfileDefinition poolSize(int poolSize)
    • poolSize

      public ThreadPoolProfileDefinition poolSize(String poolSize)
    • maxPoolSize

      public ThreadPoolProfileDefinition maxPoolSize(int maxPoolSize)
    • maxPoolSize

      public ThreadPoolProfileDefinition maxPoolSize(String maxPoolSize)
    • keepAliveTime

      public ThreadPoolProfileDefinition keepAliveTime(long keepAliveTime)
    • keepAliveTime

      public ThreadPoolProfileDefinition keepAliveTime(String keepAliveTime)
    • timeUnit

      public ThreadPoolProfileDefinition timeUnit(TimeUnit timeUnit)
    • timeUnit

      public ThreadPoolProfileDefinition timeUnit(String timeUnit)
    • maxQueueSize

      public ThreadPoolProfileDefinition maxQueueSize(int maxQueueSize)
    • maxQueueSize

      public ThreadPoolProfileDefinition maxQueueSize(String maxQueueSize)
    • rejectedPolicy

      public ThreadPoolProfileDefinition rejectedPolicy(org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy rejectedPolicy)
    • rejectedPolicy

      public ThreadPoolProfileDefinition rejectedPolicy(String rejectedPolicy)
    • allowCoreThreadTimeOut

      public ThreadPoolProfileDefinition allowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
    • allowCoreThreadTimeOut

      public ThreadPoolProfileDefinition allowCoreThreadTimeOut(String allowCoreThreadTimeOut)
    • getDefaultProfile

      public String getDefaultProfile()
    • setDefaultProfile

      public void setDefaultProfile(String defaultProfile)
      Whether this profile is the default thread pool profile
    • getPoolSize

      public String getPoolSize()
    • setPoolSize

      public void setPoolSize(String poolSize)
      Sets the core pool size
    • getMaxPoolSize

      public String getMaxPoolSize()
    • setMaxPoolSize

      public void setMaxPoolSize(String maxPoolSize)
      Sets the maximum pool size
    • getKeepAliveTime

      public String getKeepAliveTime()
    • setKeepAliveTime

      public void setKeepAliveTime(String keepAliveTime)
      Sets the keep alive time for idle threads in the pool
    • getMaxQueueSize

      public String getMaxQueueSize()
    • setMaxQueueSize

      public void setMaxQueueSize(String maxQueueSize)
      Sets the maximum number of tasks in the work queue.

      Use -1 or Integer.MAX_VALUE for an unbounded queue

    • getAllowCoreThreadTimeOut

      public String getAllowCoreThreadTimeOut()
    • setAllowCoreThreadTimeOut

      public void setAllowCoreThreadTimeOut(String allowCoreThreadTimeOut)
      Whether idle core threads is allowed to timeout and therefore can shrink the pool size below the core pool size

      Is by default true

    • getTimeUnit

      public String getTimeUnit()
    • setTimeUnit

      public void setTimeUnit(String timeUnit)
      Sets the time unit to use for keep alive time By default SECONDS is used.
    • getRejectedPolicy

      public String getRejectedPolicy()
    • setRejectedPolicy

      public void setRejectedPolicy(String rejectedPolicy)
      Sets the handler for tasks which cannot be executed by the thread pool.