Class NativeCursor

java.lang.Object
org.gridgain.internal.columnar.NativeCursor
All Implemented Interfaces:
AutoCloseable

public class NativeCursor extends Object implements AutoCloseable
Native cursor for using with Columnar Storage.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NativeCursor(long nativeCursorHandle)
    Creates a Java cursor object for a given C++ cursor object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Release native cursor instance.
    org.apache.ignite.internal.schema.BinaryTupleSchema
    Returns binary tuple schema for the cursor.
    boolean
    This method indicates whether the cursor has more data to read.
    Returns the next data page, if available.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public ByteBuffer[] nextPage() throws NoSuchElementException
      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:
      true if there is at least one more page of data available, false otherwise.
    • close

      public void close()
      Release native cursor instance.
      Specified by:
      close in interface AutoCloseable