|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.embl.ebi.escience.scuflui.workbench.ScavengerHelperThreadPool
public class ScavengerHelperThreadPool
A thread pool that handles a collection of Scavenger threads (for URLBasedScavengers) The pool ensures that there is a maximum number of concurrent threads, and maintains a waiting list for those threads that cannot yet be started. Each time getCompleted is called and the completed Scavengers are returned, waiting threads are moved to the active list and started. The pool is complete when all completed Scavengers have been return through getComplete, and isEmpty returns true
| Constructor Summary | |
|---|---|
ScavengerHelperThreadPool()
|
|
| Method Summary | |
|---|---|
void |
addScavengerHelper(ScavengerHelper helper)
Adds a new scavenger helper, and creates a thread for it to load the default scavengers. |
void |
addScavengerHelperForModel(ScavengerHelper helper,
ScuflModel theModel)
Scavengers over a ScuflModel for processors that are understood by the scavenger helper. |
void |
addThread(org.embl.ebi.escience.scuflui.workbench.ScavengerHelperThreadPool.ScavengerHelperThread thread)
|
java.util.Set<Scavenger> |
getCompleted()
Returns a Set of Scavengers that have completed their initialisation |
boolean |
isEmpty()
Returns true if all threads have completed and have had their results retrieved via getCompleted |
int |
remaining()
Returns the total number of threads waiting to complete, or waiting to be removed via getCompleted. |
int |
waiting()
Returns the number of threads waiting to start |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScavengerHelperThreadPool()
| Method Detail |
|---|
public void addThread(org.embl.ebi.escience.scuflui.workbench.ScavengerHelperThreadPool.ScavengerHelperThread thread)
public int waiting()
public int remaining()
public void addScavengerHelper(ScavengerHelper helper)
helper -
public void addScavengerHelperForModel(ScavengerHelper helper,
ScuflModel theModel)
helper - theModel - public java.util.Set<Scavenger> getCompleted()
public boolean isEmpty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||