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 Page
s 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 Classes Modifier and Type Interface Description static interface
Page.WithDefaults<ATTR extends Attributes.Any>
static interface
Page.WithDefaultsForRepeatingValues<ATTR extends Attributes.Any>
This 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 Type Method Description default void
advanceToNextPage(OrderedKeys.Iterator RowSequenceIterator)
AssumingRowSequenceIterator
is position at its first row key on this page, consume all keys on this page.default boolean
advanceToNextPage(ReadOnlyIndex.SearchIterator searchIterator)
AssumingsearchIterator
is position at its first row key on this page, consume all keys on this page.default long
advanceToNextPageAndGetPositionDistance(OrderedKeys.Iterator RowSequenceIterator)
AssumingRowSequenceIterator
is position at its first row key on this page, consume all keys on this page and return the number of keys consumed.default long
firstRow(long row)
long
firstRowOffset()
default long
getRowOffset(long row)
default long
lastRow(long row)
long
length()
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
fillChunk, getChunk, getChunk, getChunkType, getNativeType
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContext, makeFillContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContext, makeGetContext
Methods 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
AssumingRowSequenceIterator
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)AssumingRowSequenceIterator
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)AssumingsearchIterator
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)
-