Class ControlledWorkerBoundJoin
- java.lang.Object
-
- org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E>
-
- org.eclipse.rdf4j.common.iteration.LookAheadIteration<T>
-
- org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase<T>
-
- org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase<BindingSet>
-
- org.eclipse.rdf4j.federated.evaluation.join.ControlledWorkerJoin
-
- org.eclipse.rdf4j.federated.evaluation.join.ControlledWorkerBoundJoin
-
- All Implemented Interfaces:
AutoCloseable,Runnable,Iterator<BindingSet>,CloseableIteration<BindingSet>,ParallelExecutor<BindingSet>
@Deprecated(forRemoval=true) public class ControlledWorkerBoundJoin extends ControlledWorkerJoin
Deprecated, for removal: This API element is subject to removal in a future version.replaced withControlledWorkerBindJoinlExecute the nested loop join in an asynchronous fashion, using grouped requests, i.e. group bindings into one SPARQL request using a VALUES clause. The number of concurrent threads is controlled by aControlledWorkerSchedulerwhich works according to the FIFO principle and uses worker threads. This join cursor blocks until all scheduled tasks are finished, however the result iteration can be accessed from different threads to allow for pipelining.- Author:
- Andreas Schwarte
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classControlledWorkerBoundJoin.BoundJoinTaskCreatorDeprecated, for removal: This API element is subject to removal in a future version.protected classControlledWorkerBoundJoin.CheckJoinTaskCreatorDeprecated, for removal: This API element is subject to removal in a future version.protected classControlledWorkerBoundJoin.FedXServiceJoinTaskCreatorDeprecated, for removal: This API element is subject to removal in a future version.protected static interfaceControlledWorkerBoundJoin.TaskCreatorDeprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
-
Fields inherited from class org.eclipse.rdf4j.federated.evaluation.join.ControlledWorkerJoin
phaser, scheduler
-
Fields inherited from class org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase
bindings, joinVars, leftIter, rightArg
-
Fields inherited from class org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase
evaluationThread, executorId, finished, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy
-
-
Constructor Summary
Constructors Constructor Description ControlledWorkerBoundJoin(ControlledWorkerScheduler<BindingSet> scheduler, FederationEvalStrategy strategy, CloseableIteration<BindingSet> leftIter, TupleExpr rightArg, BindingSet bindings, QueryInfo queryInfo)Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ControlledWorkerBoundJoin.TaskCreatordetermineTaskCreator(TupleExpr expr, BindingSet bs)Deprecated, for removal: This API element is subject to removal in a future version.protected intgetNextBindJoinSize(int configuredBindJoinSize, int totalBindings)Deprecated, for removal: This API element is subject to removal in a future version.Return the size of the next bind join block.protected voidhandleBindings()Deprecated, for removal: This API element is subject to removal in a future version.Implementations must implement this method to handle bindings.voidhandleClose()Deprecated, for removal: This API element is subject to removal in a future version.Called byAbstractCloseableIteration.close()when it is called for the first time.protected voidsetSubmitFirstResultImmediately(boolean flag)Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase
getExecutorType, getJoinVars, performExecution, setJoinVars
-
Methods inherited from class org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase
addResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toss, toString
-
Methods inherited from class org.eclipse.rdf4j.common.iteration.LookAheadIteration
hasNext, next, remove
-
Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
close, isClosed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
stream
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
ControlledWorkerBoundJoin
public ControlledWorkerBoundJoin(ControlledWorkerScheduler<BindingSet> scheduler, FederationEvalStrategy strategy, CloseableIteration<BindingSet> leftIter, TupleExpr rightArg, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
QueryEvaluationException
-
-
Method Detail
-
setSubmitFirstResultImmediately
protected void setSubmitFirstResultImmediately(boolean flag)
Deprecated, for removal: This API element is subject to removal in a future version.
-
handleBindings
protected void handleBindings() throws ExceptionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from class:JoinExecutorBaseImplementations must implement this method to handle bindings. Use the following as a templatewhile (!closed && leftIter.hasNext()) { // your code }and add results to rightQueue. Note that addResult() is implemented synchronized and thus thread safe. In case you can guarantee sequential access, it is also possible to directly access rightQueue Note that the implementation must block until the entire join is executed.- Overrides:
handleBindingsin classControlledWorkerJoin- Throws:
Exception
-
handleClose
public void handleClose() throws QueryEvaluationExceptionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractCloseableIterationCalled byAbstractCloseableIteration.close()when it is called for the first time. This method is only called once on each iteration. By default, this method does nothing.- Overrides:
handleClosein classControlledWorkerJoin- Throws:
QueryEvaluationException
-
determineTaskCreator
protected ControlledWorkerBoundJoin.TaskCreator determineTaskCreator(TupleExpr expr, BindingSet bs)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getNextBindJoinSize
protected int getNextBindJoinSize(int configuredBindJoinSize, int totalBindings)Deprecated, for removal: This API element is subject to removal in a future version.Return the size of the next bind join block.- Parameters:
configuredBindJoinSize- the configured bind join sizetotalBindings- the current process bindings from the intermediate result set- Returns:
-
-