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,ColumnRegionChar.Null,ColumnRegionChunkDictionary,ColumnRegionDouble.Null,ColumnRegionFloat.Null,ColumnRegionInt.Null,ColumnRegionLong.Null,ColumnRegionObject.DictionaryKeysWrapper,ColumnRegionObject.IntDictionaryKeysWrapper,ColumnRegionObject.Null,ColumnRegionObjectCached,ColumnRegionObjectCodecFixed,ColumnRegionObjectCodecVariable,ColumnRegionObjectWithDictionary,ColumnRegionReferencing.Null,ColumnRegionReferencingImpl,ColumnRegionShort.Null,ColumnRegionStringSet,DeephavenColumnRegionObjectBase,DeferredColumnRegionBase,DeferredColumnRegionChar,DeferredColumnRegionDouble,DeferredColumnRegionFloat,DeferredColumnRegionInt,DeferredColumnRegionLong,DeferredColumnRegionObject,DeferredColumnRegionShort,DoubleChunkPage,FloatChunkPage,IntChunkPage,LongChunkPage,ObjectChunkPage,ParquetColumnRegionBase,ParquetColumnRegionByte,ParquetColumnRegionByte.StaticPageStore,ParquetColumnRegionChar,ParquetColumnRegionChar.StaticPageStore,ParquetColumnRegionDouble,ParquetColumnRegionDouble.StaticPageStore,ParquetColumnRegionFloat,ParquetColumnRegionFloat.StaticPageStore,ParquetColumnRegionInt,ParquetColumnRegionInt.StaticPageStore,ParquetColumnRegionLong,ParquetColumnRegionLong.StaticPageStore,ParquetColumnRegionObject,ParquetColumnRegionObject.StaticPageStore,ParquetColumnRegionShort,ParquetColumnRegionShort.StaticPageStore,ShortChunkPage
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.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacePage.WithDefaults<ATTR extends Attributes.Any>static interfaceThis has helper defaults for columns that just represent a repeating value (such as null or partition columns).Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any> -
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY -
Method Summary
Modifier and TypeMethodDescriptiondefault voidadvanceToNextPage(OrderedKeys.Iterator RowSequenceIterator) AssumingRowSequenceIteratoris position at its first row key on this page, consume all keys on this page.default booleanadvanceToNextPage(ReadOnlyIndex.SearchIterator searchIterator) AssumingsearchIteratoris position at its first row key on this page, consume all keys on this page.default longadvanceToNextPageAndGetPositionDistance(OrderedKeys.Iterator RowSequenceIterator) AssumingRowSequenceIteratoris position at its first row key on this page, consume all keys on this page and return the number of keys consumed.default longfirstRow(long row) longdefault longgetRowOffset(long row) default longlastRow(long row) longlength()Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
fillChunk, getChunk, getChunk, getChunkType, getNativeTypeMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContext, makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PagingChunkSource
fillChunkAppend, mask, maxRow
-
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
- 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
- Returns:
- the offset for the given row in this page, between [0,
length()).
-
advanceToNextPage
AssumingRowSequenceIteratoris 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) AssumingRowSequenceIteratoris 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) AssumingsearchIteratoris 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)
-