public class ControlledWorkerScheduler<T> extends Object implements Scheduler<T>
ControlledWorkerUnion, 
ControlledWorkerJoin, 
ControlledWorkerBoundJoin| Modifier and Type | Class and Description | 
|---|---|
| protected class  | ControlledWorkerScheduler.ControlStatusStructure to maintain the status for a given control instance. | 
| Constructor and Description | 
|---|
| ControlledWorkerScheduler()Construct a new instance with 20 workers. | 
| ControlledWorkerScheduler(int nWorkers,
                         String name)Construct a new instance with the specified number of workers and the given name. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | abort()Abort the execution of running and queued tasks. | 
| void | done()Inform the scheduler that a certain task is done. | 
| int | getNumberOfTasks() | 
| int | getTotalNumberOfWorkers() | 
| void | handleResult(CloseableIteration<T,QueryEvaluationException> res)Callback to handle the result. | 
| void | informFinish()Inform the scheduler that no more tasks will be scheduled. | 
| void | informFinish(ParallelExecutor<T> control)Inform this scheduler that the specified control instance will no longer submit tasks. | 
| boolean | isRunning()Determine if the scheduler has unfinished tasks. | 
| boolean | isRunning(ParallelExecutor<T> control)Determine if there are still task running or queued for the specified control. | 
| void | schedule(ParallelTask<T> task)Schedule the specified parallel task. | 
| void | scheduleAll(List<ParallelTask<T>> tasks,
           ParallelExecutor<T> control)Schedule the given tasks and inform about finish using the same lock, i.e. | 
| void | shutdown() | 
| void | toss(Exception e)Toss an exception to the scheduler. | 
public ControlledWorkerScheduler()
public ControlledWorkerScheduler(int nWorkers,
                                 String name)
nWorkers - name - public void schedule(ParallelTask<T> task)
public void scheduleAll(List<ParallelTask<T>> tasks, ParallelExecutor<T> control)
tasks - control - public int getTotalNumberOfWorkers()
public int getNumberOfTasks()
public void abort()
Schedulerpublic void done()
Schedulerpublic void handleResult(CloseableIteration<T,QueryEvaluationException> res)
SchedulerhandleResult in interface Scheduler<T>public void informFinish()
SchedulerinformFinish in interface Scheduler<T>public void informFinish(ParallelExecutor<T> control)
control - public boolean isRunning()
Schedulerpublic boolean isRunning(ParallelExecutor<T> control)
control - public void toss(Exception e)
SchedulerCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.