public class ControlledWorkerBoundJoin extends ControlledWorkerJoin
ControlledWorkerScheduler
which 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.Modifier and Type | Class and Description |
---|---|
protected class |
ControlledWorkerBoundJoin.BoundJoinTaskCreator |
protected class |
ControlledWorkerBoundJoin.CheckJoinTaskCreator |
protected class |
ControlledWorkerBoundJoin.FedXServiceJoinTaskCreator |
protected static interface |
ControlledWorkerBoundJoin.TaskCreator |
phaser, scheduler
bindings, joinVars, leftIter, rightArg
closed, evaluationThread, executorId, finished, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy
Constructor and Description |
---|
ControlledWorkerBoundJoin(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.
|
done, toss
getExecutorType, getJoinVars, handleClose, performExecution, setJoinVars
addResult, checkTimeout, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toString
hasNext, next, remove
close, isClosed
public ControlledWorkerBoundJoin(ControlledWorkerScheduler<BindingSet> scheduler, FederationEvalStrategy strategy, CloseableIteration<BindingSet,QueryEvaluationException> leftIter, TupleExpr rightArg, 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 ControlledWorkerJoin
Exception
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.