- All Implemented Interfaces:
public class ControlledWorkerUnion<T> extends WorkerUnionBase<T>
Execution of union tasks with
ControlledWorkerScheduler. Tasks can be added using the provided functions. Note that the union operation is to be executed with the
ParallelExecutorBase.run()method (also threaded execution is possible). Results are then contained in this iteration.
- Andreas Schwarte
Field SummaryModifier and TypeFieldDescription
protected final Phaser
Method SummaryModifier and TypeMethodDescription
done()Inform the controlling instance that some job is done from a different thread.
AbstractCloseableIteration.close()when it is called for the first time.
voidToss some exception to the controlling instance
union()Note: this method must block until the union is executed completely.
Methods inherited from class org.eclipse.rdf4j.federated.evaluation.union.UnionExecutorBase
Methods inherited from class org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase
addResult, checkTimeout, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toString
Methods inherited from class org.eclipse.rdf4j.common.iteration.LookAheadIteration
hasNext, next, remove
Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
waitingCountpublic static int waitingCount
awakeCountpublic static int awakeCount
phaserprotected final Phaser phaser
unionprotected void union() throws ExceptionDescription copied from class:
UnionExecutorBaseNote: this method must block until the union is executed completely. Otherwise the result queue is marked as committed while this isn't the case. The blocking behavior in general is no problem: If you need concurrent access to the result (i.e. pipelining) just run the union in a separate thread. Access to the result iteration is synchronized.
donepublic 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.
tosspublic void toss
(Exception e)Description copied from interface:
ParallelExecutorToss some exception to the controlling instance
handleClosepublic void handleClose() throws QueryEvaluationExceptionDescription copied from class:
AbstractCloseableIteration.close()when it is called for the first time. This method is only called once on each iteration. By default, this method does nothing.