org.objectweb.dream.control.activity.task.thread
Interface ThreadPoolAttributeController

All Superinterfaces:
AttributeController
All Known Implementing Classes:
BasicThreadPoolTask

public interface ThreadPoolAttributeController
extends AttributeController

Attribute controller for thread pool component.


Field Summary
static long DEFAULT_WAIT_TIMEOUT
          The default timeout.
 
Method Summary
 int getCapacity()
          Returns the capacity of the pool.
 long getWaitTimeout()
          Returns the timeout while "dying" thread can be "reactivated".
 void setCapacity(int i)
          Sets the capacity of the pool.
 void setWaitTimeout(long millis)
          Sets the timeout while a "dying" thread can be "reactivated" and reused, rather than create a new thread.
 

Field Detail

DEFAULT_WAIT_TIMEOUT

public static final long DEFAULT_WAIT_TIMEOUT
The default timeout.

See Also:
setWaitTimeout(long), Constant Field Values
Method Detail

setCapacity

public void setCapacity(int i)
Sets the capacity of the pool. The capacity of the pool is the maximum number of currently executing threads. If the capacity is decreased, none of the threads is stopped, so the number of executing threads may temporarily exced the capacity.

Parameters:
i - the capacity of the pool.

getCapacity

public int getCapacity()
Returns the capacity of the pool.

Returns:
the capacity of the pool.

setWaitTimeout

public void setWaitTimeout(long millis)
Sets the timeout while a "dying" thread can be "reactivated" and reused, rather than create a new thread.

Parameters:
millis - timeout in millisecond.

getWaitTimeout

public long getWaitTimeout()
Returns the timeout while "dying" thread can be "reactivated".

Returns:
timeout in millisecond.


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.