Package io.prestosql.spi.connector
Class RecordPageSource
- java.lang.Object
-
- io.prestosql.spi.connector.RecordPageSource
-
- All Implemented Interfaces:
ConnectorPageSource
,java.io.Closeable
,java.lang.AutoCloseable
public class RecordPageSource extends java.lang.Object implements ConnectorPageSource
-
-
Field Summary
-
Fields inherited from interface io.prestosql.spi.connector.ConnectorPageSource
NOT_BLOCKED
-
-
Constructor Summary
Constructors Constructor Description RecordPageSource(RecordSet recordSet)
RecordPageSource(java.util.List<Type> types, RecordCursor cursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Immediately finishes this page source.long
getCompletedBytes()
Gets the number of input bytes processed by this page source so far.RecordCursor
getCursor()
Page
getNextPage()
Gets the next page of data.long
getReadTimeNanos()
Gets the wall time this page source spent reading data from the input.long
getSystemMemoryUsage()
Get the total memory that needs to be reserved in the general memory pool.boolean
isFinished()
Will this page source product more pages?-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.prestosql.spi.connector.ConnectorPageSource
isBlocked
-
-
-
-
Constructor Detail
-
RecordPageSource
public RecordPageSource(RecordSet recordSet)
-
RecordPageSource
public RecordPageSource(java.util.List<Type> types, RecordCursor cursor)
-
-
Method Detail
-
getCursor
public RecordCursor getCursor()
-
getCompletedBytes
public long getCompletedBytes()
Description copied from interface:ConnectorPageSource
Gets the number of input bytes processed by this page source so far. If size is not available, this method should return zero.- Specified by:
getCompletedBytes
in interfaceConnectorPageSource
-
getReadTimeNanos
public long getReadTimeNanos()
Description copied from interface:ConnectorPageSource
Gets the wall time this page source spent reading data from the input. If read time is not available, this method should return zero.- Specified by:
getReadTimeNanos
in interfaceConnectorPageSource
-
getSystemMemoryUsage
public long getSystemMemoryUsage()
Description copied from interface:ConnectorPageSource
Get the total memory that needs to be reserved in the general memory pool. This memory should include any buffers, etc. that are used for reading data.- Specified by:
getSystemMemoryUsage
in interfaceConnectorPageSource
- Returns:
- the memory used so far in table read
-
close
public void close()
Description copied from interface:ConnectorPageSource
Immediately finishes this page source. Presto will always call this method.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceConnectorPageSource
-
isFinished
public boolean isFinished()
Description copied from interface:ConnectorPageSource
Will this page source product more pages?- Specified by:
isFinished
in interfaceConnectorPageSource
-
getNextPage
public Page getNextPage()
Description copied from interface:ConnectorPageSource
Gets the next page of data. This method is allowed to return null.- Specified by:
getNextPage
in interfaceConnectorPageSource
-
-