Package org.eclipse.rdf4j.federated.evaluation.join

## Class SynchronousBoundJoin

- java.lang.Object
- - org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,​X>
  - - org.eclipse.rdf4j.common.iteration.LookAheadIteration<T,​QueryEvaluationException>
    - - org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase<T>
      - - org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase<BindingSet>
        - - org.eclipse.rdf4j.federated.evaluation.join.SynchronousJoin
          - - org.eclipse.rdf4j.federated.evaluation.join.SynchronousBoundJoin

- All Implemented Interfaces:
    `AutoCloseable`, `Runnable`, `CloseableIteration<BindingSet,​QueryEvaluationException>`, `Iteration<BindingSet,​QueryEvaluationException>`, `ParallelExecutor<BindingSet>`

      public class SynchronousBoundJoin
      extends SynchronousJoin

  Execute the nested loop join in a synchronous fashion, using grouped requests, i.e. group bindings into one SPARQL request using the UNION operator
  Author:
    Andreas Schwarte

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase

      `bindings, joinVars, leftIter, rightArg`

    - ### Fields inherited from class org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase

      `evaluationThread, executorId, finished, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SynchronousBoundJoin​(FederationEvalStrategy strategy, CloseableIteration<BindingSet,​QueryEvaluationException> leftIter, TupleExpr rightArg, BindingSet bindings, QueryInfo queryInfo)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `handleBindings()` | Implementations must implement this method to handle bindings.

    - ### Methods inherited from class org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase

      `getExecutorType, getJoinVars, handleClose, performExecution, setJoinVars`

    - ### Methods inherited from class org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase

      `addResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toss, toString`

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.LookAheadIteration

      `hasNext, next, remove`

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration

      `close, isClosed`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.common.iteration.Iteration

      `stream`

- - ### Constructor Detail

    - #### SynchronousBoundJoin

          public SynchronousBoundJoin​(FederationEvalStrategy strategy,
                                      CloseableIteration<BindingSet,​QueryEvaluationException> leftIter,
                                      TupleExpr rightArg,
                                      BindingSet bindings,
                                      QueryInfo queryInfo)
                               throws QueryEvaluationException

      Throws:
        `QueryEvaluationException`

  - ### Method Detail

    - #### handleBindings

          protected void handleBindings()
                                 throws Exception

      Description copied from class: `JoinExecutorBase`
      Implementations must implement this method to handle bindings. Use the following as a template `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.
      Overrides:
        `handleBindings` in class `SynchronousJoin`
      Throws:
        `Exception`