Package dev.vortex.api
Class Scan
java.lang.Object
dev.vortex.api.Scan
- All Implemented Interfaces:
AutoCloseable,Iterator<Partition>
A lazy handle to a set of
partitions.
Call close() to release the scan and any partition prefetched by hasNext() but not yet returned
by next(). Partitions already returned remain valid. VortexCleaner releases an unclosed scan when it
becomes unreachable.
Native calls are synchronized with close() to prevent another thread from freeing the handle during an
operation.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.arrow.vector.types.pojo.SchemaarrowSchema(org.apache.arrow.memory.BufferAllocator allocator) Arrow schema produced by this scan.voidclose()Releases this scan once, without closing partitions already returned to the caller.booleanhasNext()next()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Method Details
-
arrowSchema
public org.apache.arrow.vector.types.pojo.Schema arrowSchema(org.apache.arrow.memory.BufferAllocator allocator) -
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<Partition>- Throws:
IllegalStateException- if this scan has been closed
-
next
- Specified by:
nextin interfaceIterator<Partition>- Throws:
IllegalStateException- if this scan has been closed
-
close
public void close()Releases this scan once, without closing partitions already returned to the caller.- Specified by:
closein interfaceAutoCloseable
-