|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser org.jboss.aspects.asynchronous.concurrent.ThreadManagerImpl
Nested Class Summary |
Nested classes 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 ThreadManager
IllegalArgumentException
- 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 ThreadManager
public boolean getWaitWhenPoolSizeIsFull()
getWaitWhenPoolSizeIsFull
in interface ThreadManager
public int getMaximumPoolSize()
getMaximumPoolSize
in interface ThreadManager
public void setMinimumPoolSize(int minimumPoolSize)
setMinimumPoolSize
in interface ThreadManager
IllegalArgumentException
- 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 ThreadManager
public void setKeepAliveTime(long time)
setKeepAliveTime
in interface ThreadManager
public long getKeepAliveTime()
getKeepAliveTime
in interface ThreadManager
public long getPoolSize()
getPoolSize
in interface ThreadManager
public ThreadManagerResponse waitForResponse(AsynchronousTask input)
waitForResponse
in interface ThreadManager
public ThreadManagerResponse[] waitForResponses(AsynchronousTask[] inputImpl)
waitForResponses
in interface ThreadManager
public AsynchronousTask process(ThreadManagerRequest ppmRequest)
ThreadManager
ppmRequest class instance defining the task parameters.
process
in interface ThreadManager
public boolean isPooling()
isPooling
in interface ThreadManager
public void setPooling(boolean isPooling)
setPooling
in interface ThreadManager
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |