Class ServiceJoinIterator
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<BindingSet>
org.eclipse.rdf4j.common.iteration.LookAheadIteration<BindingSet>
org.eclipse.rdf4j.repository.sparql.federation.JoinExecutorBase<BindingSet>
org.eclipse.rdf4j.query.algebra.evaluation.federation.ServiceJoinIterator
- All Implemented Interfaces:
AutoCloseable, Iterator<BindingSet>, CloseableIteration<BindingSet>
Iterator for efficient SERVICE evaluation (vectored). SERVICE is the right handside argument of this join.
- Author:
- Andreas Schwarte
-
Field Summary
FieldsFields inherited from class JoinExecutorBase
bindings, closed, finished, leftIter, NEXT_JOIN_ID, rightArg, rightIter, rightQueueModifier and TypeFieldDescriptionprotected final BindingSetprotected booleanDeprecated.protected booleanDeprecated.UseJoinExecutorBase.isFinished()instead.protected final CloseableIteration<BindingSet> protected static intDeprecated.No replacement, don't use static shared int variables.protected final TupleExprprotected CloseableIteration<BindingSet> protected final QueueCursor<CloseableIteration<BindingSet>> Fields inherited from interface CloseableIteration
EMPTY_STATEMENT_ITERATION -
Constructor Summary
ConstructorsConstructorDescriptionServiceJoinIterator(CloseableIteration<BindingSet> leftIter, Service service, BindingSet bindings, EvaluationStrategy strategy) Construct a service join iteration to use vectored evaluation. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplementations must implement this method to handle bindings.Methods inherited from class JoinExecutorBase
addResult, done, getNextElement, handleClose, isFinished, run, tossModifier and TypeMethodDescriptionvoidvoiddone()Gets the next element.voidCalled byAbstractCloseableIteration.close()when it is called for the first time.booleanGets whether this executor is finished or aborted.final voidrun()voidMethods inherited from class LookAheadIteration
hasNext, next, removeModifier and TypeMethodDescriptionfinal booleanhasNext()final BindingSetnext()voidremove()Throws anUnsupportedOperationException.Methods inherited from class AbstractCloseableIteration
close, isClosedModifier and TypeMethodDescriptionfinal voidclose()CallsAbstractCloseableIteration.handleClose()upon first call and makes sure the resource closures are only executed once.final booleanisClosed()Checks whether this CloseableIteration has been closed.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIteration
streamModifier and TypeMethodDescriptiondefault Stream<BindingSet> stream()Convert the results to a Java 8 Stream.Methods inherited from interface Iterator
forEachRemaining
-
Field Details
-
service
-
strategy
-
-
Constructor Details
-
ServiceJoinIterator
public ServiceJoinIterator(CloseableIteration<BindingSet> leftIter, Service service, BindingSet bindings, EvaluationStrategy strategy) throws QueryEvaluationException Construct 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:JoinExecutorBaseImplementations 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:
handleBindingsin classJoinExecutorBase<BindingSet>- Throws:
Exception
-
AbstractCloseableIteration.isClosed()instead.