Package io.trino.plugin.kinesis
Class KinesisRecordSet.KinesisRecordCursor
java.lang.Object
io.trino.plugin.kinesis.KinesisRecordSet.KinesisRecordCursor
- All Implemented Interfaces:
RecordCursor,Closeable,AutoCloseable
- Enclosing class:
- KinesisRecordSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdvances the cursor by one position, retrieving more records from Kinesis if needed.voidclose()booleangetBoolean(int field) longdoublegetDouble(int field) longgetLong(int field) getObject(int field) longio.airlift.slice.SlicegetSlice(int field) getType(int field) booleanisNull(int field) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.spi.connector.RecordCursor
getMemoryUsage
-
Constructor Details
-
KinesisRecordCursor
public KinesisRecordCursor()
-
-
Method Details
-
getCompletedBytes
public long getCompletedBytes()- Specified by:
getCompletedBytesin interfaceRecordCursor
-
getReadTimeNanos
public long getReadTimeNanos()- Specified by:
getReadTimeNanosin interfaceRecordCursor
-
getType
- Specified by:
getTypein interfaceRecordCursor
-
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:
advanceNextPositionin interfaceRecordCursor
-
getBoolean
public boolean getBoolean(int field) - Specified by:
getBooleanin interfaceRecordCursor
-
getLong
public long getLong(int field) - Specified by:
getLongin interfaceRecordCursor
-
getDouble
public double getDouble(int field) - Specified by:
getDoublein interfaceRecordCursor
-
getSlice
public io.airlift.slice.Slice getSlice(int field) - Specified by:
getSlicein interfaceRecordCursor
-
getObject
- Specified by:
getObjectin interfaceRecordCursor
-
isNull
public boolean isNull(int field) - Specified by:
isNullin interfaceRecordCursor
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceRecordCursor
-