Class JoinExecutorBase<T>
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<T>
org.eclipse.rdf4j.common.iteration.LookAheadIteration<T>
org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase<T>
org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase<T>
- All Implemented Interfaces:
 AutoCloseable, Runnable, Iterator<T>, CloseableIteration<T>, ParallelExecutor<T>
- Direct Known Subclasses:
 ControlledWorkerBindJoinBase, ControlledWorkerJoin, ControlledWorkerLeftJoin, HashJoin, SynchronousJoin
Base class for any join parallel join executor.
Note that this class extends 
LookAheadIteration and thus any implementation of this class is applicable for
pipelining when used in a different thread (access to shared variables is synchronized).- Author:
 - Andreas Schwarte
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BindingSetprotected CloseableIteration<T> protected final TupleExprFields inherited from class ParallelExecutorBase
evaluationThread, executorId, finished, log, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategyFields inherited from interface CloseableIteration
EMPTY_STATEMENT_ITERATION - 
Constructor Summary
ConstructorsConstructorDescriptionJoinExecutorBase(FederationEvalStrategy strategy, CloseableIteration<T> leftIter, TupleExpr rightArg, BindingSet bindings, QueryInfo queryInfo)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected abstract voidImplementations must implement this method to handle bindings.voidCalled byAbstractCloseableIteration.close()when it is called for the first time.protected final voidPerform the parallel execution.voidsetJoinVars(Set<String> joinVars) Set the join variablesMethods inherited from class ParallelExecutorBase
addResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toss, toStringMethods inherited from class LookAheadIteration
hasNext, next, removeMethods inherited from class AbstractCloseableIteration
close, isClosedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CloseableIteration
streamMethods inherited from interface Iterator
forEachRemaining 
- 
Field Details
- 
rightArg
 - 
bindings
 - 
joinVars
 - 
leftIter
 
 - 
 - 
Constructor Details
- 
JoinExecutorBase
public JoinExecutorBase(FederationEvalStrategy strategy, CloseableIteration<T> leftIter, TupleExpr rightArg, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException - Throws:
 QueryEvaluationException
 
 - 
 - 
Method Details
- 
performExecution
Description copied from class:ParallelExecutorBasePerform the parallel execution.Note that this method must block until the execution is completed.
- Specified by:
 performExecutionin classParallelExecutorBase<T>- Throws:
 Exception
 - 
handleBindings
Implementations must implement this method to handle bindings. Use the following as a templatewhile (!closed invalid input: '&'invalid input: '&' 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.- Throws:
 Exception
 - 
handleClose
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 classParallelExecutorBase<T>- Throws:
 QueryEvaluationException
 - 
getExecutorType
- Overrides:
 getExecutorTypein classParallelExecutorBase<T>- Returns:
 - the executor type, e.g. "Join". Default "Executor"
 
 - 
getJoinVars
 - 
setJoinVars
 
 -