org.apache.camel.impl
Class ThreadPoolProfileSupport

java.lang.Object
  extended by org.apache.camel.impl.ThreadPoolProfileSupport
All Implemented Interfaces:
ThreadPoolProfile

public class ThreadPoolProfileSupport
extends Object
implements ThreadPoolProfile

Version:
$Revision: 18409 $

Constructor Summary
ThreadPoolProfileSupport(String id)
           
 
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
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadPoolProfileSupport

public ThreadPoolProfileSupport(String id)
Method Detail

getId

public String getId()
Description copied from interface: ThreadPoolProfile
Gets the id of this profile

Specified by:
getId in interface ThreadPoolProfile
Returns:
the id of this profile

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

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL