public class RunningQueryCloseableIterator<E> extends Object implements ICloseableIterator<E>
IRunningQuery with logic to (a) verify
that the IRunningQuery has not encountered an error; and (b) to
cancel the IRunningQuery when the iterator draining the
IRunningQuery is closed.| Constructor and Description |
|---|
RunningQueryCloseableIterator(IRunningQuery runningQuery,
ICloseableIterator<E> src) |
public RunningQueryCloseableIterator(IRunningQuery runningQuery, ICloseableIterator<E> src)
public void close()
ICloseableIteratorICloseableIterator.close() if Iterator.hasNext()
method returns false to ensure that the iterator is closed
(and its resources release) as soon as it is exhausted.
Note: Implementations that support Iterator.remove() MUST NOT
eagerly close the iterator when it is exhausted since that would make it
impossible to remove the last visited statement. Instead they MUST wait
for an explicit ICloseableIterator.close() by the application.
close in interface ICloseableclose in interface ICloseableIterator<E>Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.