public class ControlledWorkerJoin 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 Phaser |
phaser |
protected ControlledWorkerScheduler<BindingSet> |
scheduler |
bindings, joinVars, leftIter, rightArgevaluationThread, executorId, finished, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy| Constructor and Description |
|---|
ControlledWorkerJoin(ControlledWorkerScheduler<BindingSet> scheduler,
FederationEvalStrategy strategy,
CloseableIteration<BindingSet,QueryEvaluationException> leftIter,
TupleExpr rightArg,
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, setJoinVarsaddResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toss, toStringhasNext, next, removeclose, isClosedprotected final ControlledWorkerScheduler<BindingSet> scheduler
protected final Phaser phaser
public ControlledWorkerJoin(ControlledWorkerScheduler<BindingSet> scheduler, FederationEvalStrategy strategy, CloseableIteration<BindingSet,QueryEvaluationException> leftIter, TupleExpr rightArg, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException
QueryEvaluationExceptionprotected 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>Exceptionpublic void handleClose()
throws QueryEvaluationException
AbstractCloseableIterationAbstractCloseableIteration.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>QueryEvaluationExceptionCopyright © 2015-2022 Eclipse Foundation. All Rights Reserved.