FileDocCategorySizeDatePackage
ThreadManager.javaAPI DocJBoss 4.2.13736Fri Jul 13 21:02:30 BST 2007org.jboss.aspects.asynchronous

ThreadManager

public interface ThreadManager
author
{Claude Hussenet Independent Consultant}.
version
$Revision: 57186 $

Fields Summary
Constructors Summary
Methods Summary
public abstract longgetKeepAliveTime()
Return the number of milliseconds to keep threads alive waiting

for new commands. A negative value means to wait forever. A zero

value means not to wait at all.

public abstract intgetMaximumPoolSize()
Return the maximum number of threads to use.

public abstract intgetMinimumPoolSize()
Return the maximum number of threads to simultaneously execute

public abstract longgetPoolSize()
Return the current number of active threads in the pool.

public abstract booleangetWaitWhenPoolSizeIsFull()
return the policy when the pool is full

public abstract booleanisPooling()

public abstract AsynchronousTaskprocess(ThreadManagerRequest ppmRequest)
Create, start and return a new asynchronous task from

ppmRequest class instance defining the task parameters.

public abstract voidsetKeepAliveTime(long time)
Set the number of milliseconds to keep threads alive waiting for

new commands. A negative value means to wait forever. A zero

value means not to wait at all.

public abstract voidsetMaximumPoolSize(int maximumPoolSize)
Set the maximum number of threads to use.

public abstract voidsetMinimumPoolSize(int minimumPoolSize)
Set the minimum number of threads to use.

public abstract voidsetPooling(boolean isPooling)

public abstract voidsetWaitWhenPoolSizeIsFull(boolean value)
Set the policy for blocked execution to be to wait until a thread

is available.

OR

Set the policy for blocked execution to be to

throw a RuntimeException.

public abstract ThreadManagerResponsewaitForResponse(AsynchronousTask input)
Return the response from an asynchronous task

The call returns within the timeout defined

in the process method

public abstract ThreadManagerResponse[]waitForResponses(AsynchronousTask[] input)
Return an array of responses from an array of asynchronous task

The call returns within the maximum timeout from the array of tasks