public abstract class JoinExecutorBase<T> extends ParallelExecutorBase<T>
LookAheadIteration
and thus any implementation of this class is applicable for
pipelining when used in a different thread (access to shared variables is synchronized).Modifier and Type | Field and Description |
---|---|
protected BindingSet |
bindings |
protected Set<String> |
joinVars |
protected CloseableIteration<T,QueryEvaluationException> |
leftIter |
protected TupleExpr |
rightArg |
closed, evaluationThread, executorId, finished, log, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy
Constructor and Description |
---|
JoinExecutorBase(FederationEvalStrategy strategy,
CloseableIteration<T,QueryEvaluationException> leftIter,
TupleExpr rightArg,
BindingSet bindings,
QueryInfo queryInfo) |
Modifier and Type | Method and Description |
---|---|
protected String |
getExecutorType() |
Set<String> |
getJoinVars() |
protected abstract void |
handleBindings()
Implementations must implement this method to handle bindings.
|
void |
handleClose()
Called by
AbstractCloseableIteration.close() when it is called for the first time. |
protected void |
performExecution()
Perform the parallel execution.
|
void |
setJoinVars(Set<String> joinVars)
Set the join variables
|
addResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toss, toString
hasNext, next, remove
close, isClosed
protected final TupleExpr rightArg
protected final BindingSet bindings
protected CloseableIteration<T,QueryEvaluationException> leftIter
public JoinExecutorBase(FederationEvalStrategy strategy, CloseableIteration<T,QueryEvaluationException> leftIter, TupleExpr rightArg, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException
QueryEvaluationException
protected final void performExecution() throws Exception
ParallelExecutorBase
performExecution
in class ParallelExecutorBase<T>
Exception
protected abstract void handleBindings() throws Exception
while (!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.Exception
public void handleClose() throws QueryEvaluationException
AbstractCloseableIteration
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.handleClose
in class ParallelExecutorBase<T>
QueryEvaluationException
protected String getExecutorType()
getExecutorType
in class ParallelExecutorBase<T>
public Set<String> getJoinVars()
null
if unknown in the concrete implementationCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.