Package org.gridgain.internal.columnar
Class NativeCursor
java.lang.Object
org.gridgain.internal.columnar.NativeCursor
- All Implemented Interfaces:
AutoCloseable
Native cursor for using with Columnar Storage.
-
Constructor Summary
ConstructorsConstructorDescriptionNativeCursor(long nativeCursorHandle) Creates a Java cursor object for a given C++ cursor object. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Release native cursor instance.org.apache.ignite.internal.schema.BinaryTupleSchemaReturns binary tuple schema for the cursor.booleanThis method indicates whether the cursor has more data to read.nextPage()Returns the next data page, if available.
-
Constructor Details
-
NativeCursor
public NativeCursor(long nativeCursorHandle) Creates a Java cursor object for a given C++ cursor object.- Parameters:
nativeCursorHandle- ID of a native C++ cursor object.
-
-
Method Details
-
getTupleSchema
public org.apache.ignite.internal.schema.BinaryTupleSchema getTupleSchema()Returns binary tuple schema for the cursor.- Returns:
- Binary tuple schema.
-
nextPage
Returns the next data page, if available.To check if data is available
hasNextPage()must be called prior calling this method.- Returns:
- An array of tuples fetched from the native storage by this cursor.
- Throws:
NoSuchElementException
-
hasNextPage
public boolean hasNextPage()This method indicates whether the cursor has more data to read.- Returns:
trueif there is at least one more page of data available,falseotherwise.
-
close
public void close()Release native cursor instance.- Specified by:
closein interfaceAutoCloseable
-