public class ControlledWorkerLeftJoin extends JoinExecutorBase<BindingSet>
ControlledWorkerScheduler
which works according to the
FIFO principle.
This join cursor blocks until all scheduled tasks are finished, however the result iteration can be accessed from
different threads to allow for pipelining.Modifier and Type | Field and Description |
---|---|
protected LeftJoin |
join |
protected Phaser |
phaser |
protected ControlledWorkerScheduler<BindingSet> |
scheduler |
bindings, joinVars, leftIter, rightArg
evaluationThread, executorId, finished, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy
Constructor and Description |
---|
ControlledWorkerLeftJoin(ControlledWorkerScheduler<BindingSet> scheduler,
FederationEvalStrategy strategy,
CloseableIteration<BindingSet,QueryEvaluationException> leftIter,
LeftJoin join,
BindingSet bindings,
QueryInfo queryInfo) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleBindings()
Implementations must implement this method to handle bindings.
|
void |
handleClose()
Called by
AbstractCloseableIteration.close() when it is called for the first time. |
getExecutorType, getJoinVars, performExecution, setJoinVars
addResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toss, toString
hasNext, next, remove
close, isClosed
protected final ControlledWorkerScheduler<BindingSet> scheduler
protected final Phaser phaser
protected final LeftJoin join
public ControlledWorkerLeftJoin(ControlledWorkerScheduler<BindingSet> scheduler, FederationEvalStrategy strategy, CloseableIteration<BindingSet,QueryEvaluationException> leftIter, LeftJoin join, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException
QueryEvaluationException
protected void handleBindings() throws Exception
JoinExecutorBase
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.handleBindings
in class JoinExecutorBase<BindingSet>
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 JoinExecutorBase<BindingSet>
QueryEvaluationException
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.