|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Method Summary | |
void |
addJob(java.lang.Runnable job)
Adds a 'job' to the ThreadPool to be executed in a Thread. |
boolean |
checkBeforeProcessing()
Returns a flag indicating whether this ThreadPool should check itself before adding another job to the pool. |
int |
getJobsInProgress()
Returns the number of jobs that are currently in progress for this ThreadPool. |
Stats |
getStats()
Takes a "snapshot" of the threadpool at the current time and returns statistics. |
| Method Detail |
public void addJob(java.lang.Runnable job)
throws ThreadPoolException
- - ThreadPoolException if it has any problems adding the job to the ThreadPool.
ThreadPoolExceptioncheckBeforeProcessing()public Stats getStats()
Statspublic int getJobsInProgress()
public boolean checkBeforeProcessing()
This is used to verify that the ThreadPool can actually accept and immediately process a job that's added via the addJob method. This is to reduce the number of potential jobs in memory in a "pending" state waiting for the ThreadPool to free up some idle threads.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||