Class RepositoryFederatedService.FallbackServiceIteration
- java.lang.Object
-
- org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,X>
-
- org.eclipse.rdf4j.common.iteration.LookAheadIteration<T,QueryEvaluationException>
-
- org.eclipse.rdf4j.repository.sparql.federation.JoinExecutorBase<BindingSet>
-
- org.eclipse.rdf4j.repository.sparql.federation.RepositoryFederatedService.FallbackServiceIteration
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,CloseableIteration<BindingSet,QueryEvaluationException>
,Iteration<BindingSet,QueryEvaluationException>
- Enclosing class:
- RepositoryFederatedService
private class RepositoryFederatedService.FallbackServiceIteration extends JoinExecutorBase<BindingSet>
Helper iteration to evaluate a block ofBindingSet
s using the simpleRepositoryFederatedService.select(Service, Set, BindingSet, String)
routine.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<BindingSet>
allBindings
private java.lang.String
baseUri
private Service
service
-
Fields inherited from class org.eclipse.rdf4j.repository.sparql.federation.JoinExecutorBase
bindings, closed, finished, leftIter, NEXT_JOIN_ID, rightArg, rightIter, rightQueue
-
-
Constructor Summary
Constructors Constructor Description FallbackServiceIteration(Service service, java.util.List<BindingSet> allBindings, java.lang.String baseUri)
-
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.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 Detail
-
service
private final Service service
-
allBindings
private final java.util.List<BindingSet> allBindings
-
baseUri
private final java.lang.String baseUri
-
-
Constructor Detail
-
FallbackServiceIteration
public FallbackServiceIteration(Service service, java.util.List<BindingSet> allBindings, java.lang.String baseUri)
-
-
Method Detail
-
handleBindings
protected void handleBindings() throws java.lang.Exception
Description copied from class:JoinExecutorBase
Implementations must implement this method to handle bindings. Use the following as a templatewhile (!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- Specified by:
handleBindings
in classJoinExecutorBase<BindingSet>
- Throws:
java.lang.Exception
-
-