Package org.apache.druid.query.scan
Class ScanResultValueIterator
- java.lang.Object
-
- org.apache.druid.query.scan.ScanResultValueIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<ScanResultValue>,CloseableIterator<ScanResultValue>
public class ScanResultValueIterator extends Object implements CloseableIterator<ScanResultValue>
Iterates over the scan result sequence and provides an interface to clean up the resources (if any) to close the underlying sequence. Similar toYielder, once close is called on the iterator, the calls to the rest of the iterator's methods are undefined.
-
-
Constructor Summary
Constructors Constructor Description ScanResultValueIterator(Sequence<ScanResultValue> resultSequence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()ScanResultValuenext()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.java.util.common.parsers.CloseableIterator
flatMap, map
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
ScanResultValueIterator
public ScanResultValueIterator(Sequence<ScanResultValue> resultSequence)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<ScanResultValue>
-
next
public ScanResultValue next()
- Specified by:
nextin interfaceIterator<ScanResultValue>
-
-