Class KinesisRecordSet.KinesisRecordCursor

java.lang.Object
io.trino.plugin.kinesis.KinesisRecordSet.KinesisRecordCursor
All Implemented Interfaces:
RecordCursor, Closeable, AutoCloseable
Enclosing class:
KinesisRecordSet

public class KinesisRecordSet.KinesisRecordCursor extends Object implements RecordCursor
  • Constructor Details

    • KinesisRecordCursor

      public KinesisRecordCursor()
  • Method Details

    • getCompletedBytes

      public long getCompletedBytes()
      Specified by:
      getCompletedBytes in interface RecordCursor
    • getReadTimeNanos

      public long getReadTimeNanos()
      Specified by:
      getReadTimeNanos in interface RecordCursor
    • getType

      public Type getType(int field)
      Specified by:
      getType in interface RecordCursor
    • advanceNextPosition

      public boolean advanceNextPosition()
      Advances the cursor by one position, retrieving more records from Kinesis if needed.

      We retrieve records from Kinesis in batches, using the getRecordsRequest. After a getRecordsRequest we keep iterating through that list of records until we run out. Then we will get another batch unless we've hit the limit or have caught up.

      Specified by:
      advanceNextPosition in interface RecordCursor
    • getBoolean

      public boolean getBoolean(int field)
      Specified by:
      getBoolean in interface RecordCursor
    • getLong

      public long getLong(int field)
      Specified by:
      getLong in interface RecordCursor
    • getDouble

      public double getDouble(int field)
      Specified by:
      getDouble in interface RecordCursor
    • getSlice

      public io.airlift.slice.Slice getSlice(int field)
      Specified by:
      getSlice in interface RecordCursor
    • getObject

      public Object getObject(int field)
      Specified by:
      getObject in interface RecordCursor
    • isNull

      public boolean isNull(int field)
      Specified by:
      isNull in interface RecordCursor
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface RecordCursor