Class SourceSelection.SourceSelectionExecutorWithLatch
java.lang.Object
org.eclipse.rdf4j.federated.optimizer.SourceSelection.SourceSelectionExecutorWithLatch
- All Implemented Interfaces:
Runnable,ParallelExecutor<BindingSet>
- Enclosing class:
- SourceSelection
protected static class SourceSelection.SourceSelectionExecutorWithLatch
extends Object
implements ParallelExecutor<BindingSet>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidHandle the result appropriately, e.g.voiddone()Inform the controlling instance that some job is done from a different thread.Return the query info of the associated querybooleanReturn true if this executor is finished or abortedvoidrun()static voidrun(SourceSelection sourceSelection, List<SourceSelection.CheckTaskPair> tasks, SourceSelectionCache cache) Execute the given list of tasks in parallel, and block the thread until all tasks are completed.voidToss some exception to the controlling instance
-
Field Details
-
errors
-
-
Method Details
-
run
public static void run(SourceSelection sourceSelection, List<SourceSelection.CheckTaskPair> tasks, SourceSelectionCache cache) Execute the given list of tasks in parallel, and block the thread until all tasks are completed. Synchronization is achieved by means of a latch. Results are added to the map of the source selection instance. Errors are reported asOptimizationExceptioninstances.- Parameters:
tasks-
-
run
public void run() -
addResult
Description copied from interface:ParallelExecutorHandle the result appropriately, e.g. add it to the result iteration. Take care for synchronization in a multithreaded environment- Specified by:
addResultin interfaceParallelExecutor<BindingSet>
-
toss
Description copied from interface:ParallelExecutorToss some exception to the controlling instance- Specified by:
tossin interfaceParallelExecutor<BindingSet>
-
done
public void done()Description copied from interface:ParallelExecutorInform the controlling instance that some job is done from a different thread. In most cases this is a no-op.- Specified by:
donein interfaceParallelExecutor<BindingSet>
-
isFinished
public boolean isFinished()Description copied from interface:ParallelExecutorReturn true if this executor is finished or aborted- Specified by:
isFinishedin interfaceParallelExecutor<BindingSet>- Returns:
- whether the execution is finished
-
getQueryInfo
Description copied from interface:ParallelExecutorReturn the query info of the associated query- Specified by:
getQueryInfoin interfaceParallelExecutor<BindingSet>- Returns:
- the query info
-