Class ThreadSafeDelayedIteration<E>

java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E>
org.eclipse.rdf4j.common.iteration.ThreadSafeDelayedIteration<E>
All Implemented Interfaces:
AutoCloseable, Iterator<E>, CloseableIteration<E>

public abstract class ThreadSafeDelayedIteration<E> extends AbstractCloseableIteration<E>
An iteration that delays the creation of the underlying iteration until it is being accessed. This is mainly useful for situations where iteration creation adds considerable overhead but where the iteration may not actually be used, or where a created iteration consumes scarce resources like JDBC-connections or memory. Subclasses must implement the createIteration method, which is called once when the iteration is first needed.