Class ConsumingIteration

java.lang.Object
org.eclipse.rdf4j.federated.evaluation.iterator.ConsumingIteration
All Implemented Interfaces:
AutoCloseable, Iterator<BindingSet>, CloseableIteration<BindingSet>

public class ConsumingIteration extends Object implements CloseableIteration<BindingSet>
A specialized CloseableIteration that consumes part (or the entire input iteration if it fits into the buffer) and keeps data for further processing in memory. If the buffer is full, the remaining items will be read from the iteration lazily. This implementation can be used to avoid blocking behavior in HTTP connection streams, i.e. to process results in memory and close the underlying HTTP stream.
Author:
Andreas Schwarte