|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.group.threadpool.ThreadPool
A thread pool is a set of threads waiting for jobs. The thread in the pool are created one time and re-used for new jobs.
Field Summary | |
protected EndControler |
controler
The controler that is looking for the end of jobs to perform. |
Constructor Summary | |
ThreadPool()
Builds a ThreadPool. |
|
ThreadPool(int size)
Builds a ThreadPool, specifying the number of thread to create. |
Method Summary | |
void |
addAJob(AbstractProcessForGroup r)
Adds a job to the pending queue of the thread pool. |
void |
checkNumberOfThreads(int members)
Check wether the number of threads in this threadpool is sufficient compared to the number of members in the group |
void |
complete()
Waits until the ThreadPool has no more job to execute (pending queue is empty). |
protected void |
createThreads(int number)
Creates the needed threads for this ThreadPool |
void |
finalize()
Cleanly destroys a ThreadPool object |
java.lang.Runnable |
getJobForThePendingQueue()
Picks up new job to execute in the pending queue. |
void |
ratio(int i)
Modifies the number of members served by one thread |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected EndControler controler
Constructor Detail |
public ThreadPool()
public ThreadPool(int size)
Method Detail |
protected void createThreads(int number)
public void checkNumberOfThreads(int members)
public void ratio(int i)
i
- - the new ratiopublic void addAJob(AbstractProcessForGroup r)
public java.lang.Runnable getJobForThePendingQueue()
public void complete()
public void finalize()
finalize
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |