Package io.deephaven.engine.page
Interface ChunkPage<ATTR extends 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 Any>
extends Page.WithDefaults<ATTR>, Chunk<ATTR>, DefaultChunkSource.SupportsContiguousGet<ATTR>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.chunk.Chunk
Chunk.Visitor<ATTR extends Any>
Nested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Any>, DefaultChunkSource.WithPrev<ATTR extends Any>
Nested classes/interfaces inherited from interface io.deephaven.engine.page.Page
Page.WithDefaults<ATTR extends Any>, Page.WithDefaultsForRepeatingValues<ATTR extends Any>
-
Field Summary
Fields inherited from interface io.deephaven.chunk.Chunk
MAXIMUM_SIZE, SYSTEM_ARRAYCOPY_THRESHOLD, SYSTEM_ARRAYFILL_THRESHOLD
Fields inherited from interface io.deephaven.engine.table.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptiongetChunk
(@NotNull ChunkSource.GetContext context, long firstKey, long lastKey) Same asChunkSource.getChunk(GetContext, RowSequence)
, except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anRowSequence
.default int
getChunkOffset
(long row) Get the most suitableChunkType
for use with this ChunkSource.default long
lastRow
(long row) default long
maxRow
(long rowKey) ThemaxRow
is the greatest possible row key which may be referenced in this ChunkSource.Methods inherited from interface io.deephaven.chunk.Chunk
asBooleanChunk, asByteChunk, asCharChunk, asDoubleChunk, asFloatChunk, asIntChunk, asLongChunk, asObjectChunk, asShortChunk, checkChunkType, copyToArray, copyToBuffer, copyToChunk, isAlias, isAlias, size, slice, walk
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunkByFilling, makeGetContext
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.SupportsContiguousGet
getChunk
Methods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContext
Methods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContext
Methods inherited from interface io.deephaven.engine.page.Page
advanceToNextPage, advanceToNextPage, advanceToNextPageAndGetPositionDistance, firstRow, firstRowOffset, getRowOffset
Methods inherited from interface io.deephaven.engine.page.Page.WithDefaults
fillChunk, fillChunkAppend, fillChunkAppend
Methods inherited from interface io.deephaven.engine.page.PagingChunkSource
makeFillContext, mask
-
Method Details
-
getChunkType
ChunkType getChunkType()Description copied from interface:ChunkSource
Get the most suitableChunkType
for use with this ChunkSource.- Specified by:
getChunkType
in interfaceChunk<ATTR extends Any>
- Specified by:
getChunkType
in interfaceChunkSource<ATTR extends Any>
- Returns:
- The ChunkType
-
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.
-
maxRow
Description copied from interface:PagingChunkSource
The
maxRow
is the greatest possible row key which may be referenced in this ChunkSource. This method is used byPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)
to determine which of its row keys are supplied by thisPagingChunkSource
.The default implementation assumes that only one
PagingChunkSource
exits for each page reference. That is, there is only onePagingChunkSource
forRowSequences
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:
maxRow
in interfacePagingChunkSource<ATTR extends Any>
- Parameters:
rowKey
- Any row key contained by thisPagingChunkSource
- Returns:
- The maximum last row key of the page, located in the same way as
rowKey
-
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 @NotNull ChunkSource.GetContext context, long firstKey, long lastKey) Description copied from interface:ChunkSource
Same asChunkSource.getChunk(GetContext, RowSequence)
, except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anRowSequence
. Typically you want to call this only if you don't have anRowSequence
, such as during anRowSequence.forAllRowKeyRanges(LongRangeConsumer)
call. In this case, it allows you to avoid creating an intermediaryRowSequence
object.- Specified by:
getChunk
in interfaceChunkSource<ATTR extends Any>
- Specified by:
getChunk
in interfaceDefaultChunkSource<ATTR extends Any>
- Specified by:
getChunk
in interfaceDefaultChunkSource.SupportsContiguousGet<ATTR extends 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
-