Class FixedPageSource

java.lang.Object
io.trino.spi.connector.FixedPageSource
All Implemented Interfaces:
ConnectorPageSource, Closeable, AutoCloseable

public class FixedPageSource extends Object implements ConnectorPageSource
  • Constructor Details

    • FixedPageSource

      public FixedPageSource(List<Page> pages)
    • FixedPageSource

      public FixedPageSource(Iterator<Page> pages, long memoryUsageBytes)
  • Method Details

    • close

      public void close()
      Description copied from interface: ConnectorPageSource
      Immediately finishes this page source. Trino will always call this method.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface ConnectorPageSource
    • 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 interface ConnectorPageSource
    • 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 interface ConnectorPageSource
    • isFinished

      public boolean isFinished()
      Description copied from interface: ConnectorPageSource
      Will this page source product more pages?
      Specified by:
      isFinished in interface ConnectorPageSource
    • 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 interface ConnectorPageSource
    • getMemoryUsage

      public long getMemoryUsage()
      Description copied from interface: ConnectorPageSource
      Get 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:
      getMemoryUsage in interface ConnectorPageSource
      Returns:
      the memory used so far in table read