public class ParallelRunner extends Object
| Constructor and Description |
|---|
ParallelRunner()
Default constructor.
|
ParallelRunner(int iThreadPoolSize)
Constructor with thread pool size parameter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(ParallelTaskFactory<?> taskFactory,
int nbRuns)
Adds a new task factory, with the number of instances
it should provide, OR updates the number of instances if
the task factory was added before.
|
String |
getResultSummary()
Gets the result summary.
|
void |
resizeThreadPool(int thPoolSize)
Resizes the thread pool.
|
boolean |
runAll()
Run all the tasks.
|
public ParallelRunner()
public ParallelRunner(int iThreadPoolSize)
iThreadPoolSize - thread pool sizepublic void addTask(ParallelTaskFactory<?> taskFactory, int nbRuns)
taskFactory - the task factorynbRuns - the number of instances to create, equal to the number of "runs" for the matching ParallelTask class.public String getResultSummary()
public boolean runAll()
throws InterruptedException
InterruptedException - in case of thread pool interruptionpublic void resizeThreadPool(int thPoolSize)
thPoolSize - new thread pool sizeCopyright © 2024 CNES. All rights reserved.