Package io.trino.spi.connector
Class FixedPageSource
java.lang.Object
io.trino.spi.connector.FixedPageSource
- All Implemented Interfaces:
ConnectorPageSource,Closeable,AutoCloseable
-
Field Summary
Fields inherited from interface io.trino.spi.connector.ConnectorPageSource
NOT_BLOCKED -
Constructor Summary
ConstructorsConstructorDescriptionFixedPageSource(Iterator<Page> pages, long memoryUsageBytes) FixedPageSource(List<Page> pages) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Immediately finishes this page source.longGets the number of input bytes processed by this page source so far.longGet the total memory that needs to be reserved in the memory pool.Gets the next page of data.longGets the wall time this page source spent reading data from the input.booleanWill this page source product more pages?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.ConnectorPageSource
getCompletedPositions, getMetrics, isBlocked
-
Constructor Details
-
FixedPageSource
-
FixedPageSource
-
-
Method Details
-
close
public void close()Description copied from interface:ConnectorPageSourceImmediately finishes this page source. Trino will always call this method.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceConnectorPageSource
-
getCompletedBytes
public long getCompletedBytes()Description copied from interface:ConnectorPageSourceGets the number of input bytes processed by this page source so far. If size is not available, this method should return zero.- Specified by:
getCompletedBytesin interfaceConnectorPageSource
-
getReadTimeNanos
public long getReadTimeNanos()Description copied from interface:ConnectorPageSourceGets 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:
getReadTimeNanosin interfaceConnectorPageSource
-
isFinished
public boolean isFinished()Description copied from interface:ConnectorPageSourceWill this page source product more pages?- Specified by:
isFinishedin interfaceConnectorPageSource
-
getNextPage
Description copied from interface:ConnectorPageSourceGets the next page of data. This method is allowed to return null.- Specified by:
getNextPagein interfaceConnectorPageSource
-
getMemoryUsage
public long getMemoryUsage()Description copied from interface:ConnectorPageSourceGet the total memory that needs to be reserved in the memory pool. This memory should include any buffers, etc. that are used for reading data.- Specified by:
getMemoryUsagein interfaceConnectorPageSource- Returns:
- the memory used so far in table read
-