Class LockingIteration<E>

All Implemented Interfaces:
AutoCloseable, Iterator<E>, CloseableIteration<E>

public class LockingIteration<E> extends IterationWrapper<E>
An Iteration that holds on to a lock until the Iteration is closed. Upon closing, the underlying Iteration is closed before the lock is released. This iterator closes itself as soon as all elements have been read.