Class DefaultEvaluationStrategy.ResultSizeCountingIterator
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<BindingSet,QueryEvaluationException>
org.eclipse.rdf4j.common.iteration.IterationWrapper<BindingSet,QueryEvaluationException>
org.eclipse.rdf4j.query.algebra.evaluation.impl.DefaultEvaluationStrategy.ResultSizeCountingIterator
- All Implemented Interfaces:
AutoCloseable
,CloseableIteration<BindingSet,
,QueryEvaluationException> Iteration<BindingSet,
QueryEvaluationException>
- Enclosing class:
DefaultEvaluationStrategy
private static class DefaultEvaluationStrategy.ResultSizeCountingIterator
extends IterationWrapper<BindingSet,QueryEvaluationException>
This class wraps an iterator and increments the "resultSizeActual" of the query model node that the iterator
represents. This means we can track the number of tuples that have been retrieved from this node.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) CloseableIteration
<BindingSet, QueryEvaluationException> (package private) QueryModelNode
Fields inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper
wrappedIter
-
Constructor Summary
ConstructorsConstructorDescriptionResultSizeCountingIterator
(CloseableIteration<BindingSet, QueryEvaluationException> iterator, QueryModelNode queryModelNode) -
Method Summary
Methods inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper
handleClose, 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
-
iterator
-
queryModelNode
QueryModelNode queryModelNode
-
-
Constructor Details
-
ResultSizeCountingIterator
public ResultSizeCountingIterator(CloseableIteration<BindingSet, QueryEvaluationException> iterator, QueryModelNode queryModelNode)
-
-
Method Details
-
hasNext
Description copied from class:IterationWrapper
Checks whether the wrapped Iteration contains more elements, closing this Iteration when this is not the case.- Specified by:
hasNext
in interfaceIteration<BindingSet,
QueryEvaluationException> - Overrides:
hasNext
in classIterationWrapper<BindingSet,
QueryEvaluationException> - Returns:
- true if the wrapped Iteration contains more elements, false otherwise.
- Throws:
QueryEvaluationException
-
next
Description copied from class:IterationWrapper
Returns the next element from the wrapped Iteration.- Specified by:
next
in interfaceIteration<BindingSet,
QueryEvaluationException> - Overrides:
next
in classIterationWrapper<BindingSet,
QueryEvaluationException> - Returns:
- the next element in the iteration.
- Throws:
QueryEvaluationException
-