站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 aspects API Documentation 英文版文档

ThreadManager (JBoss Aspects API) - JBoss 4.0.1 sp1 aspects API Documentation 英文版文档


org.jboss.aspects.asynchronous
Interface ThreadManager

All Known Implementing Classes:
ThreadManagerImpl

public interface ThreadManager

Version:
$Revision: 1.2 $
Author:
{Claude Hussenet Independent Consultant}.

Method Summary
 long getKeepAliveTime()
          Return the number of milliseconds to keep threads alive waiting

for new commands.

 int getMaximumPoolSize()
          Return the maximum number of threads to use.
 int getMinimumPoolSize()
          Return the maximum number of threads to simultaneously execute
 long getPoolSize()
          Return the current number of active threads in the pool.
 boolean getWaitWhenPoolSizeIsFull()
          return the policy when the pool is full
 boolean isPooling()
           
 AsynchronousTask process(ThreadManagerRequest ppmRequest)
          Create, start and return a new asynchronous task from

 void setKeepAliveTime(long time)
          Set the number of milliseconds to keep threads alive waiting for

new commands.

 void setMaximumPoolSize(int maximumPoolSize)
          Set the maximum number of threads to use.
 void setMinimumPoolSize(int minimumPoolSize)
          Set the minimum number of threads to use.
 void setPooling(boolean isPooling)
           
 void setWaitWhenPoolSizeIsFull(boolean value)
          Set the policy for blocked execution to be to wait until a thread

is available.

 ThreadManagerResponse waitForResponse(AsynchronousTask input)
          Return the response from an asynchronous task

The call returns within the timeout defined

in the process method

 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

 

Method Detail

setWaitWhenPoolSizeIsFull

public void setWaitWhenPoolSizeIsFull(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.


getWaitWhenPoolSizeIsFull

public boolean getWaitWhenPoolSizeIsFull()
return the policy when the pool is full


setMaximumPoolSize

public void setMaximumPoolSize(int maximumPoolSize)
Set the maximum number of threads to use.


getMaximumPoolSize

public int getMaximumPoolSize()
Return the maximum number of threads to use.


setMinimumPoolSize

public void setMinimumPoolSize(int minimumPoolSize)
Set the minimum number of threads to use.


getMinimumPoolSize

public int getMinimumPoolSize()
Return the maximum number of threads to simultaneously execute


setKeepAliveTime

public void setKeepAliveTime(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.


getKeepAliveTime

public long getKeepAliveTime()
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.


getPoolSize

public long getPoolSize()
Return the current number of active threads in the pool.


waitForResponse

public ThreadManagerResponse waitForResponse(AsynchronousTask input)
Return the response from an asynchronous task

The call returns within the timeout defined

in the process method


waitForResponses

public 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


process

public AsynchronousTask process(ThreadManagerRequest ppmRequest)
Create, start and return a new asynchronous task from

ppmRequest class instance defining the task parameters.


isPooling

public boolean isPooling()

setPooling

public void setPooling(boolean isPooling)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.