org.apache.camel.model
Class ThreadPoolProfileDefinition

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedDefinition
      extended by org.apache.camel.model.ThreadPoolProfileDefinition
All Implemented Interfaces:
ThreadPoolProfile

public class ThreadPoolProfileDefinition
extends OptionalIdentifiedDefinition
implements ThreadPoolProfile

Represents an XML <threadPoolProfile/> element

Version:
$Revision: 1021867 $

Constructor Summary
ThreadPoolProfileDefinition()
           
ThreadPoolProfileDefinition(ThreadPoolProfile threadPoolProfile)
           
 
Method Summary
 Long getKeepAliveTime()
          Gets the keep alive time for inactive threads
 Integer getMaxPoolSize()
          Gets the maximum pool size
 Integer getMaxQueueSize()
          Gets the maximum number of tasks in the work queue.
 Integer getPoolSize()
          Gets the core pool size (threads to keep minimum in pool)
 RejectedExecutionHandler getRejectedExecutionHandler()
          Gets the handler for tasks which cannot be executed by the thread pool.
 ThreadPoolRejectedPolicy getRejectedPolicy()
          Gets the handler for tasks which cannot be executed by the thread pool.
 TimeUnit getTimeUnit()
          Gets the time unit used for keep alive time
 Boolean isDefaultProfile()
          Whether this profile is the default profile (there can only be one).
 ThreadPoolProfileDefinition keepAliveTime(long keepAliveTime)
           
 ThreadPoolProfileDefinition maxPoolSize(int maxPoolSize)
           
 ThreadPoolProfileDefinition maxQueueSize(int maxQueueSize)
           
 ThreadPoolProfileDefinition poolSize(int poolSize)
           
 ThreadPoolProfileDefinition rejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
           
 void setDefaultProfile(Boolean defaultProfile)
          Sets whether this profile is the default profile (there can only be one).
 void setKeepAliveTime(Long keepAliveTime)
          Sets the keep alive time for inactive threads
 void setMaxPoolSize(Integer maxPoolSize)
          Sets the maximum pool size
 void setMaxQueueSize(Integer maxQueueSize)
          Sets the maximum number of tasks in the work queue.
 void setPoolSize(Integer poolSize)
          Sets the core pool size (threads to keep minimum in pool)
 void setRejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
          Sets the handler for tasks which cannot be executed by the thread pool.
 void setTimeUnit(TimeUnit timeUnit)
          Sets the time unit used for keep alive time
 ThreadPoolProfileDefinition timeUnit(TimeUnit timeUnit)
           
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, id, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.spi.ThreadPoolProfile
getId
 

Constructor Detail

ThreadPoolProfileDefinition

public ThreadPoolProfileDefinition()

ThreadPoolProfileDefinition

public ThreadPoolProfileDefinition(ThreadPoolProfile threadPoolProfile)
Method Detail

poolSize

public ThreadPoolProfileDefinition poolSize(int poolSize)

maxPoolSize

public ThreadPoolProfileDefinition maxPoolSize(int maxPoolSize)

keepAliveTime

public ThreadPoolProfileDefinition keepAliveTime(long keepAliveTime)

timeUnit

public ThreadPoolProfileDefinition timeUnit(TimeUnit timeUnit)

maxQueueSize

public ThreadPoolProfileDefinition maxQueueSize(int maxQueueSize)

rejectedPolicy

public ThreadPoolProfileDefinition rejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)

isDefaultProfile

public Boolean isDefaultProfile()
Description copied from interface: ThreadPoolProfile
Whether this profile is the default profile (there can only be one).

Specified by:
isDefaultProfile in interface ThreadPoolProfile
Returns:
true if its the default profile, false otherwise

setDefaultProfile

public void setDefaultProfile(Boolean defaultProfile)
Description copied from interface: ThreadPoolProfile
Sets whether this profile is the default profile (there can only be one).

Specified by:
setDefaultProfile in interface ThreadPoolProfile
Parameters:
defaultProfile - the option

getPoolSize

public Integer getPoolSize()
Description copied from interface: ThreadPoolProfile
Gets the core pool size (threads to keep minimum in pool)

Specified by:
getPoolSize in interface ThreadPoolProfile
Returns:
the pool size

setPoolSize

public void setPoolSize(Integer poolSize)
Description copied from interface: ThreadPoolProfile
Sets the core pool size (threads to keep minimum in pool)

Specified by:
setPoolSize in interface ThreadPoolProfile
Parameters:
poolSize - the pool size

getMaxPoolSize

public Integer getMaxPoolSize()
Description copied from interface: ThreadPoolProfile
Gets the maximum pool size

Specified by:
getMaxPoolSize in interface ThreadPoolProfile
Returns:
the maximum pool size

setMaxPoolSize

public void setMaxPoolSize(Integer maxPoolSize)
Description copied from interface: ThreadPoolProfile
Sets the maximum pool size

Specified by:
setMaxPoolSize in interface ThreadPoolProfile
Parameters:
maxPoolSize - the maximum pool size

getKeepAliveTime

public Long getKeepAliveTime()
Description copied from interface: ThreadPoolProfile
Gets the keep alive time for inactive threads

Specified by:
getKeepAliveTime in interface ThreadPoolProfile
Returns:
the keep alive time

setKeepAliveTime

public void setKeepAliveTime(Long keepAliveTime)
Description copied from interface: ThreadPoolProfile
Sets the keep alive time for inactive threads

Specified by:
setKeepAliveTime in interface ThreadPoolProfile
Parameters:
keepAliveTime - the keep alive time

getTimeUnit

public TimeUnit getTimeUnit()
Description copied from interface: ThreadPoolProfile
Gets the time unit used for keep alive time

Specified by:
getTimeUnit in interface ThreadPoolProfile
Returns:
the time unit

setTimeUnit

public void setTimeUnit(TimeUnit timeUnit)
Description copied from interface: ThreadPoolProfile
Sets the time unit used for keep alive time

Specified by:
setTimeUnit in interface ThreadPoolProfile
Parameters:
timeUnit - the time unit

getMaxQueueSize

public Integer getMaxQueueSize()
Description copied from interface: ThreadPoolProfile
Gets the maximum number of tasks in the work queue.

Use -1 or Integer.MAX_VALUE for an unbounded queue

Specified by:
getMaxQueueSize in interface ThreadPoolProfile
Returns:
the max queue size

setMaxQueueSize

public void setMaxQueueSize(Integer maxQueueSize)
Description copied from interface: ThreadPoolProfile
Sets the maximum number of tasks in the work queue.

Use -1 or Integer.MAX_VALUE for an unbounded queue

Specified by:
setMaxQueueSize in interface ThreadPoolProfile
Parameters:
maxQueueSize - the max queue size

getRejectedPolicy

public ThreadPoolRejectedPolicy getRejectedPolicy()
Description copied from interface: ThreadPoolProfile
Gets the handler for tasks which cannot be executed by the thread pool.

Specified by:
getRejectedPolicy in interface ThreadPoolProfile
Returns:
the policy for the handler

getRejectedExecutionHandler

public RejectedExecutionHandler getRejectedExecutionHandler()
Description copied from interface: ThreadPoolProfile
Gets the handler for tasks which cannot be executed by the thread pool.

Specified by:
getRejectedExecutionHandler in interface ThreadPoolProfile
Returns:
the handler, or null if none defined

setRejectedPolicy

public void setRejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
Description copied from interface: ThreadPoolProfile
Sets the handler for tasks which cannot be executed by the thread pool.

Specified by:
setRejectedPolicy in interface ThreadPoolProfile
Parameters:
rejectedPolicy - the policy for the handler


Apache CAMEL