Package net.quasardb.qdb.ts
Class Reader
java.lang.Object
net.quasardb.qdb.ts.Reader
- All Implemented Interfaces:
AutoCloseable
,Iterator<WritableRow>
High-performance bulk reader for a QuasarDB timeseries table. This class follows the
general Iterator pattern, and allows you to scan entire timeseries tables in bulk.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the timeseries table and local cache so that memory can be reclaimed.protected void
finalize()
Cleans up the internal representation of the local table.getTable()
boolean
hasNext()
Check whether there is another row available for reading or not.next()
Modifies internal state to move forward to the next row.stream()
Provides stream-based access.Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
Reader
-
Reader
-
-
Method Details
-
getTable
- Returns:
- The underlying table that is being written to.
-
finalize
Cleans up the internal representation of the local table. -
close
Closes the timeseries table and local cache so that memory can be reclaimed.- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
hasNext
public boolean hasNext()Check whether there is another row available for reading or not. When this function returns true, it is safe to callnext
.- Specified by:
hasNext
in interfaceIterator<WritableRow>
- Returns:
- Returns true when another row is available for reading.
-
next
Modifies internal state to move forward to the next row. Make sure to check whether it is safe to read the next row usinghasNext()
.- Specified by:
next
in interfaceIterator<WritableRow>
- Returns:
- The next row.
- Throws:
InvalidIteratorException
- Thrown when the iterator has reached the end and no next row is available.
-
stream
Provides stream-based access.
-