|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectEDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser
org.jboss.aspects.asynchronous.concurrent.ThreadManagerImpl
public class ThreadManagerImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
|---|
EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser.DefaultThreadFactory |
| Field Summary | |
|---|---|
protected EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
_pooledExecutor
|
protected boolean |
isPooling
|
protected boolean |
waitWhenPoolSizeIsFull
|
| Fields inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
|---|
threadFactory_ |
| Fields inherited from interface org.jboss.aspects.asynchronous.AsynchronousConstants |
|---|
CAN_NOT_PROCESS, EXCEPTIONCAUGHT, INTERRUPTED, INVOCATION, NOVALUE, OK, TIMEOUT, UNKNOWN |
| Constructor Summary | |
|---|---|
ThreadManagerImpl()
Create a new pool with all default settings |
|
ThreadManagerImpl(int maximumPoolSize)
Create a new pool with all default settings except for maximum pool size. |
|
| 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 simultaneously execute |
int |
getMinimumPoolSize()
Return the minimum 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 minimum 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[] inputImpl)
Return an array of responses from an array of asynchronous task The call returns within the maximum timeout from the array of tasks |
| Methods inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
|---|
getThreadFactory, setThreadFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EDU.oswego.cs.dl.util.concurrent.PooledExecutor _pooledExecutor
protected boolean waitWhenPoolSizeIsFull
protected boolean isPooling
| Constructor Detail |
|---|
public ThreadManagerImpl()
public ThreadManagerImpl(int maximumPoolSize)
| Method Detail |
|---|
public void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize in interface ThreadManagerIllegalArgumentException - if less than zero. (It is not
considered an error to set the minimum to be greater than the
maximum. However, in this case there are no guarantees about
behavior.)public void setWaitWhenPoolSizeIsFull(boolean value)
setWaitWhenPoolSizeIsFull in interface ThreadManagerpublic boolean getWaitWhenPoolSizeIsFull()
getWaitWhenPoolSizeIsFull in interface ThreadManagerpublic int getMaximumPoolSize()
getMaximumPoolSize in interface ThreadManagerpublic void setMinimumPoolSize(int minimumPoolSize)
setMinimumPoolSize in interface ThreadManagerIllegalArgumentException - if less than zero. (It is not
considered an error to set the minimum to be greater than the
maximum. However, in this case there are no guarantees about
behavior.)public int getMinimumPoolSize()
getMinimumPoolSize in interface ThreadManagerpublic void setKeepAliveTime(long time)
setKeepAliveTime in interface ThreadManagerpublic long getKeepAliveTime()
getKeepAliveTime in interface ThreadManagerpublic long getPoolSize()
getPoolSize in interface ThreadManagerpublic ThreadManagerResponse waitForResponse(AsynchronousTask input)
waitForResponse in interface ThreadManagerpublic ThreadManagerResponse[] waitForResponses(AsynchronousTask[] inputImpl)
waitForResponses in interface ThreadManagerpublic AsynchronousTask process(ThreadManagerRequest ppmRequest)
ThreadManagerppmRequest class instance defining the task parameters.
process in interface ThreadManagerpublic boolean isPooling()
isPooling in interface ThreadManagerpublic void setPooling(boolean isPooling)
setPooling in interface ThreadManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||