Class ServiceJoinIterator
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<BindingSet,QueryEvaluationException>
org.eclipse.rdf4j.common.iteration.LookAheadIteration<BindingSet,QueryEvaluationException>
org.eclipse.rdf4j.repository.sparql.federation.JoinExecutorBase<BindingSet>
org.eclipse.rdf4j.query.algebra.evaluation.federation.JoinExecutorBase<BindingSet>
org.eclipse.rdf4j.query.algebra.evaluation.federation.ServiceJoinIterator
- All Implemented Interfaces:
AutoCloseable
,CloseableIteration<BindingSet,
,QueryEvaluationException> Iteration<BindingSet,
QueryEvaluationException>
Iterator for efficient SERVICE evaluation (vectored). SERVICE is the right handside argument of this join.
- Author:
- Andreas Schwarte
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.repository.sparql.federation.JoinExecutorBase
bindings, closed, finished, leftIter, NEXT_JOIN_ID, rightArg, rightIter, rightQueue
-
Constructor Summary
ConstructorDescriptionServiceJoinIterator
(CloseableIteration<BindingSet, QueryEvaluationException> leftIter, Service service, BindingSet bindings, EvaluationStrategy strategy) Construct a service join iteration to use vectored evaluation. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Implementations must implement this method to handle bindings.Methods inherited from class org.eclipse.rdf4j.repository.sparql.federation.JoinExecutorBase
addResult, done, getNextElement, handleClose, isFinished, run, toss
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, toString, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
stream
-
Field Details
-
service
-
strategy
-
-
Constructor Details
-
ServiceJoinIterator
public ServiceJoinIterator(CloseableIteration<BindingSet, QueryEvaluationException> leftIter, Service service, BindingSet bindings, EvaluationStrategy strategy) throws QueryEvaluationExceptionConstruct a service join iteration to use vectored evaluation. The constructor automatically starts evaluation.- Parameters:
leftIter
-service
-bindings
-strategy
-- Throws:
QueryEvaluationException
-
-
Method Details
-
handleBindings
Description copied from class:JoinExecutorBase
Implementations must implement this method to handle bindings. Use the following as a templatewhile (!closed invalid input: '&'invalid input: '&' 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- Specified by:
handleBindings
in classJoinExecutorBase<BindingSet>
- Throws:
Exception
-