|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for a generic pool of worker threads.
Method Summary | |
int |
busyThreads()
Gives the number of busy (working) worker threads in the pool |
void |
destroy()
Destroys the pool and all it's threads. |
void |
destroyThread(java.lang.Thread thread)
Destroys the pooled thread |
WorkTracker |
execute(WorkerTask task)
Queues up a task to be executed. |
java.lang.Thread |
getPooledThread()
Gets the pooled thread |
int |
idleThreads()
Gives the number of idle threads in the pool |
void |
lockThread(java.lang.Thread thread)
Locks the thread to the pool |
void |
releaseThread(java.lang.Thread thread)
Release the thread to the pool |
int |
totalThreads()
Gives the total number of threads in the pool |
Method Detail |
public WorkTracker execute(WorkerTask task) throws java.lang.IllegalStateException
task
- the task to be executed
java.lang.IllegalStateException
- - thrown if the pool has been destroyedpublic int totalThreads() throws java.lang.IllegalStateException
java.lang.IllegalStateException
public int idleThreads() throws java.lang.IllegalStateException
java.lang.IllegalStateException
public int busyThreads() throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void releaseThread(java.lang.Thread thread) throws java.lang.Exception
java.lang.Exception
public void lockThread(java.lang.Thread thread) throws java.lang.Exception
java.lang.Exception
public java.lang.Thread getPooledThread() throws java.lang.Exception
java.lang.Exception
public void destroyThread(java.lang.Thread thread)
public void destroy()
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |