Interface Page<ATTR extends Attributes.Any>

All Superinterfaces:
ChunkSource<ATTR>, FillContextMaker, GetContextMaker, PagingChunkSource<ATTR>
All Known Subinterfaces:
BufferedColumnRegion<ATTR>, BufferedPage<ATTR>, ChunkPage<ATTR>, ColumnRegion<ATTR>, ColumnRegionByte<ATTR>, ColumnRegionChar<ATTR>, ColumnRegionDouble<ATTR>, ColumnRegionFloat<ATTR>, ColumnRegionInt<ATTR>, ColumnRegionLong<ATTR>, ColumnRegionObject<T,​ATTR>, ColumnRegionReferencing<ATTR,​REFERENCED_COLUMN_REGION>, ColumnRegionShort<ATTR>, Page.WithDefaults<ATTR>, Page.WithDefaultsForRepeatingValues<ATTR>
All Known Implementing Classes:
BooleanChunkPage, BufferedColumnRegionBase, BufferedColumnRegionByte, BufferedColumnRegionChar, BufferedColumnRegionDouble, BufferedColumnRegionFloat, BufferedColumnRegionInt, BufferedColumnRegionLong, BufferedColumnRegionShort, BufferedPageByte, BufferedPageChar, BufferedPageDouble, BufferedPageFloat, BufferedPageInt, BufferedPageLong, BufferedPageShort, ByteChunkPage, CharChunkPage, ColumnChunkPageStore, ColumnRegion.Null, ColumnRegionByte.Null, ColumnRegionByte.StaticPageStore, ColumnRegionChar.Null, ColumnRegionChar.StaticPageStore, ColumnRegionChunkDictionary, ColumnRegionDouble.Null, ColumnRegionDouble.StaticPageStore, ColumnRegionFloat.Null, ColumnRegionFloat.StaticPageStore, ColumnRegionInt.Null, ColumnRegionInt.StaticPageStore, ColumnRegionLong.Null, ColumnRegionLong.StaticPageStore, ColumnRegionObject.DictionaryKeysWrapper, ColumnRegionObject.IntDictionaryKeysWrapper, ColumnRegionObject.Null, ColumnRegionObject.StaticPageStore, ColumnRegionObjectCached, ColumnRegionObjectCodecFixed, ColumnRegionObjectCodecVariable, ColumnRegionObjectWithDictionary, ColumnRegionReferencing.Null, ColumnRegionReferencingImpl, ColumnRegionShort.Null, ColumnRegionShort.StaticPageStore, ColumnRegionStringSet, DeferredColumnRegionBase, DeferredColumnRegionChar, DeferredColumnRegionDouble, DeferredColumnRegionFloat, DeferredColumnRegionInt, DeferredColumnRegionLong, DeferredColumnRegionObject, DeferredColumnRegionReferencing, DeferredColumnRegionShort, DoubleChunkPage, FloatChunkPage, IntChunkPage, LongChunkPage, ObjectChunkPage, ParquetColumnRegionBase, ParquetColumnRegionByte, ParquetColumnRegionChar, ParquetColumnRegionDouble, ParquetColumnRegionFloat, ParquetColumnRegionInt, ParquetColumnRegionLong, ParquetColumnRegionObject, ParquetColumnRegionShort, ParquetColumnRegionSymbolTable, ShortChunkPage

public interface Page<ATTR extends Attributes.Any>
extends PagingChunkSource<ATTR>
This provides the ChunkSource interface to a contiguous block of data from the range [firstRowOffset(),firstRowOffset() + length()). Non overlapping pages can be collected together in a PageStore, which provides the ChunkSource interface to the collection of all of its Pages. There are two distinct use cases/types of pages. The first use case are Pages which always have a length() > 0. These store length() values, which can be assessed via the ChunkSource methods. Valid OrderedKeys passed to those methods will have their offset in the range [firstRowOffset(), firstRowOffset() + length()). Passing OrderKeys with offsets outside of this range will have undefined results. The second use case will always have length() == 0 and firstRowOffset() == 0. These represent "Null" regions which return a fixed value, typically a null value, for every OrderedKeys passed into the ChunkSource methods. In order to have this use case, override length and override lastRow as maxRow. Though the ChunkSource methods ignore the non-offset portion of the rows in the OrderedKeys, then can assume they are identical for all the passed in elements of the OrderedKeys. For instance, they can use the simple difference between the complete row value to determine a length.
  • Method Details

    • firstRowOffset

      long firstRowOffset()
      Returns:
      the first row of this page, after applying the PagingChunkSource.mask(), which refers to the first row of this page.
    • firstRow

      @FinalDefault default long firstRow​(long row)
      Parameters:
      row - Any row contained on this page.
      Returns:
      the first row of this page, located in the same way as row.
    • lastRow

      default long lastRow​(long row)
      Parameters:
      row - Any row contained on this page.
      Returns:
      the last row of this page, located in the same way as row.
    • length

      long length()
      Returns:
      the length of this page.
    • getRowOffset

      @FinalDefault default long getRowOffset​(long row)
      Returns:
      the offset for the given row in this page, between [0, length()).
    • advanceToNextPage

      @FinalDefault default void advanceToNextPage​(@NotNull OrderedKeys.Iterator RowSequenceIterator)
      Assuming RowSequenceIterator is position at its first row key on this page, consume all keys on this page.
      Parameters:
      RowSequenceIterator - The iterator to advance
    • advanceToNextPageAndGetPositionDistance

      @FinalDefault default long advanceToNextPageAndGetPositionDistance​(@NotNull OrderedKeys.Iterator RowSequenceIterator)
      Assuming RowSequenceIterator is position at its first row key on this page, consume all keys on this page and return the number of keys consumed.
      Parameters:
      RowSequenceIterator - The iterator to advance
    • advanceToNextPage

      @FinalDefault default boolean advanceToNextPage​(@NotNull ReadOnlyIndex.SearchIterator searchIterator)
      Assuming searchIterator is position at its first row key on this page, consume all keys on this page.
      Parameters:
      searchIterator - The iterator to advance
      Returns:
      The result of ReadOnlyIndex.SearchIterator.advance(long)