org.apache.camel.spi
Interface ThreadPoolProfile

All Known Implementing Classes:
ThreadPoolProfileSupport

public interface ThreadPoolProfile

A profile which defines thread pool settings.

Version:

Method Summary
 String getId()
          Gets the id of this profile
 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).
 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
 

Method Detail

getId

String getId()
Gets the id of this profile

Returns:
the id of this profile

isDefaultProfile

Boolean isDefaultProfile()
Whether this profile is the default profile (there can only be one).

Returns:
true if its the default profile, false otherwise

setDefaultProfile

void setDefaultProfile(Boolean defaultProfile)
Sets whether this profile is the default profile (there can only be one).

Parameters:
defaultProfile - the option

getPoolSize

Integer getPoolSize()
Gets the core pool size (threads to keep minimum in pool)

Returns:
the pool size

setPoolSize

void setPoolSize(Integer poolSize)
Sets the core pool size (threads to keep minimum in pool)

Parameters:
poolSize - the pool size

getMaxPoolSize

Integer getMaxPoolSize()
Gets the maximum pool size

Returns:
the maximum pool size

setMaxPoolSize

void setMaxPoolSize(Integer maxPoolSize)
Sets the maximum pool size

Parameters:
maxPoolSize - the maximum pool size

getKeepAliveTime

Long getKeepAliveTime()
Gets the keep alive time for inactive threads

Returns:
the keep alive time

setKeepAliveTime

void setKeepAliveTime(Long keepAliveTime)
Sets the keep alive time for inactive threads

Parameters:
keepAliveTime - the keep alive time

getTimeUnit

TimeUnit getTimeUnit()
Gets the time unit used for keep alive time

Returns:
the time unit

setTimeUnit

void setTimeUnit(TimeUnit timeUnit)
Sets the time unit used for keep alive time

Parameters:
timeUnit - the time unit

getMaxQueueSize

Integer getMaxQueueSize()
Gets the maximum number of tasks in the work queue.

Use -1 or Integer.MAX_VALUE for an unbounded queue

Returns:
the max queue size

setMaxQueueSize

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

Use -1 or Integer.MAX_VALUE for an unbounded queue

Parameters:
maxQueueSize - the max queue size

getRejectedPolicy

ThreadPoolRejectedPolicy getRejectedPolicy()
Gets the handler for tasks which cannot be executed by the thread pool.

Returns:
the policy for the handler

getRejectedExecutionHandler

RejectedExecutionHandler getRejectedExecutionHandler()
Gets the handler for tasks which cannot be executed by the thread pool.

Returns:
the handler, or null if none defined

setRejectedPolicy

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

Parameters:
rejectedPolicy - the policy for the handler


Apache CAMEL