Interface ChunkPage<ATTR extends Attributes.Any>
- All Superinterfaces:
Chunk<ATTR>,ChunkSource<ATTR>,DefaultChunkSource<ATTR>,DefaultChunkSource.SupportsContiguousGet<ATTR>,FillContextMaker,GetContextMaker,Page<ATTR>,Page.WithDefaults<ATTR>,PagingChunkSource<ATTR>
- All Known Implementing Classes:
BooleanChunkPage,ByteChunkPage,CharChunkPage,DoubleChunkPage,FloatChunkPage,IntChunkPage,LongChunkPage,ObjectChunkPage,ShortChunkPage
public interface ChunkPage<ATTR extends Attributes.Any>
extends Page.WithDefaults<ATTR>, Chunk<ATTR>, DefaultChunkSource.SupportsContiguousGet<ATTR>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>, DefaultChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.page.Page
Page.WithDefaults<ATTR extends Attributes.Any>, Page.WithDefaultsForRepeatingValues<ATTR extends Attributes.Any> -
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.sources.chunk.Chunk
MAXIMUM_SIZE, SYSTEM_ARRAYCOPY_THRESHOLD, SYSTEM_ARRAYFILL_THRESHOLDFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY -
Method Summary
Modifier and TypeMethodDescriptiongetChunk(ChunkSource.GetContext context, long firstKey, long lastKey) Same asChunkSource.getChunk(GetContext, OrderedKeys), except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anOrderedKeys.default intgetChunkOffset(long row) Get the most suitableChunkTypefor use with this ColumnSource.default longlength()default longmaxRow(long row) ThemaxRowis the greatest possible row which may reference this ChunkSource.Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.Chunk
asBooleanChunk, asByteChunk, asCharChunk, asDoubleChunk, asFloatChunk, asIntChunk, asLongChunk, asObjectChunk, asShortChunk, copyToArray, copyToBuffer, copyToChunk, isAlias, isAlias, size, sliceMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
getNativeTypeMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.SupportsContiguousGet
getChunkMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.Page
advanceToNextPage, advanceToNextPage, advanceToNextPageAndGetPositionDistance, firstRow, firstRowOffset, getRowOffset, lastRowMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.Page.WithDefaults
fillChunk, fillChunkAppend, fillChunkAppendMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PagingChunkSource
mask
-
Method Details
-
getChunkType
ChunkType getChunkType()Description copied from interface:ChunkSourceGet the most suitableChunkTypefor use with this ColumnSource.- Specified by:
getChunkTypein interfaceChunk<ATTR extends Attributes.Any>- Specified by:
getChunkTypein interfaceChunkSource<ATTR extends Attributes.Any>- Returns:
- The ChunkType
-
length
- Specified by:
lengthin interfacePage<ATTR extends Attributes.Any>- Returns:
- the length of this page.
-
maxRow
Description copied from interface:PagingChunkSourceThe
maxRowis the greatest possible row which may reference this ChunkSource. This method is used byPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, OrderedKeys.Iterator)to determine which of itsOrderedKeysare referencing thisPagingChunkSource.The default implementation assumes that only one
PagingChunkSourceexits for each page reference. That is, there is only onePagingChunkSourceforOrderedKeys with the same bits outside ofPagingChunkSource.mask().It is also possible to pack multiple, non-overlapping
PagingChunkSources into the same page reference. In this case, one typically will want to overridemaxRow. An example such implementation isChunkPage.- Specified by:
maxRowin interfacePagingChunkSource<ATTR extends Attributes.Any>- Parameters:
row- Any row contained on this page.- Returns:
- the maximum last row of this page, located in the same way as row.
-
getChunkOffset
- Returns:
- The offset into the chunk for this row.
- ApiNote:
- This function is for convenience over
Page.getRowOffset(long), so the caller doesn't have to cast to an int. - ImplNote:
- This page is known to be a chunk, so
Chunk.size()is an int, and so is the offset.
-
getChunk
@FinalDefault default Chunk<? extends ATTR> getChunk(@NotNull ChunkSource.GetContext context, long firstKey, long lastKey) Description copied from interface:ChunkSourceSame asChunkSource.getChunk(GetContext, OrderedKeys), except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anOrderedKeys. Typically you want to call this only if you don't have anOrderedKeys, such as during anOrderedKeys.forAllLongRanges(LongRangeConsumer)call. In this case, it allows you to avoid creating an intermediaryOrderedKeysobject.- Specified by:
getChunkin interfaceChunkSource<ATTR extends Attributes.Any>- Specified by:
getChunkin interfaceDefaultChunkSource<ATTR extends Attributes.Any>- Specified by:
getChunkin interfaceDefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>- Parameters:
context- A context containing all mutable/state related data used in retrieving the Chunk. In particular, the Context may be used to provide a Chunk data poolfirstKey- The beginning key (inclusive) of the range to fetch in the chunklastKey- The last key (inclusive) of the range to fetch in the chunk- Returns:
- A chunk of data corresponding to the keys from the given range.
-