Package io.deephaven.engine.page
Interface PageStore<ATTR extends Any,INNER_ATTR extends ATTR,PAGE extends Page<INNER_ATTR>>
- All Superinterfaces:
ChunkSource<ATTR>
,DefaultChunkSource<ATTR>
,DefaultChunkSource.SupportsContiguousGet<ATTR>
,FillContextMaker
,GetContextMaker
,PagingChunkSource<ATTR>
- All Known Subinterfaces:
RegionedPageStore<ATTR,
INNER_ATTR, REGION_TYPE>
- All Known Implementing Classes:
AppendOnlyFixedSizePageRegionByte
,AppendOnlyFixedSizePageRegionChar
,AppendOnlyFixedSizePageRegionDouble
,AppendOnlyFixedSizePageRegionFloat
,AppendOnlyFixedSizePageRegionInt
,AppendOnlyFixedSizePageRegionLong
,AppendOnlyFixedSizePageRegionObject
,AppendOnlyFixedSizePageRegionShort
,ColumnChunkPageStore
,ColumnRegionByte.StaticPageStore
,ColumnRegionChar.StaticPageStore
,ColumnRegionDouble.StaticPageStore
,ColumnRegionFloat.StaticPageStore
,ColumnRegionInt.StaticPageStore
,ColumnRegionLong.StaticPageStore
,ColumnRegionObject.StaticPageStore
,ColumnRegionShort.StaticPageStore
,RegionedPageStore.Static
public interface PageStore<ATTR extends Any,INNER_ATTR extends ATTR,PAGE extends Page<INNER_ATTR>>
extends PagingChunkSource<ATTR>, DefaultChunkSource.SupportsContiguousGet<ATTR>
PageStores are a collection of non-overlapping
Pages
, providing a single PagingChunkSource
across all the pages. PageStores are responsible for mapping row keys to pages. PageStores may themselves be Pages
nested within other PageStores.-
Nested Class Summary
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>
-
Field Summary
Fields inherited from interface io.deephaven.engine.table.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
doFillChunkAppend
(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull RowSequence rowSequence, @NotNull Page<INNER_ATTR> page) This is a helper which is the same as a call tofillChunkAppend(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence.Iterator)
, except that some of the initial work has already been done for the first call toPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)
which we don't want to repeat.default void
fillChunk
(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull RowSequence rowSequence) Populates the given destination chunk with data corresponding to the keys from the givenRowSequence
.default void
fillChunkAppend
(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, RowSequence.Iterator rowSequenceIterator) Similar toChunkSource.fillChunk(FillContext, WritableChunk, RowSequence)
, except that the values are appended todestination
, rather than placed at the beginning.getChunk
(@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
.getChunk
(@NotNull ChunkSource.GetContext context, @NotNull RowSequence rowSequence) Returns a chunk of data corresponding to the keys from the givenRowSequence
.getPageContaining
(@Nullable ChunkSource.FillContext fillContext, long rowKey) Methods inherited from interface io.deephaven.engine.table.ChunkSource
getChunkType
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunkByFilling, makeGetContext
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.PagingChunkSource
makeFillContext, mask, maxRow
-
Method Details
-
getPageContaining
@NotNull PAGE getPageContaining(@Nullable @Nullable ChunkSource.FillContext fillContext, long rowKey) - Parameters:
fillContext
- The fill context to use; may benull
if the calling code does not have a fill contextrowKey
- The row key to get the page for- Returns:
- The page containing
rowKey
, after applyingPagingChunkSource.mask()
.
-
getChunk
default Chunk<? extends ATTR> getChunk(@NotNull @NotNull ChunkSource.GetContext context, @NotNull @NotNull RowSequence rowSequence) Description copied from interface:ChunkSource
Returns a chunk of data corresponding to the keys from the givenRowSequence
.- 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 poolrowSequence
- AnRowSequence
representing the keys to be fetched- Returns:
- A chunk of data corresponding to the keys from the given
RowSequence
-
getChunk
@NotNull default @NotNull 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
-
fillChunk
default void fillChunk(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super ATTR> destination, @NotNull @NotNull RowSequence rowSequence) Description copied from interface:ChunkSource
Populates the given destination chunk with data corresponding to the keys from the givenRowSequence
.- Specified by:
fillChunk
in interfaceChunkSource<ATTR extends Any>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk.destination
- The chunk to be populated according torowSequence
. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,rowSequence.size()).rowSequence
- AnRowSequence
representing the keys to be fetched
-
fillChunkAppend
default void fillChunkAppend(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super ATTR> destination, @NotNull RowSequence.Iterator rowSequenceIterator) Description copied from interface:PagingChunkSource
Similar to
ChunkSource.fillChunk(FillContext, WritableChunk, RowSequence)
, except that the values are appended todestination
, rather than placed at the beginning.The values to fill into
destination
are specified byrowSequenceIterator
, whoseRowSequence.firstRowKey()
must exist, and must be represented by thisPagingChunkSource
(moduloPagingChunkSource.mask()
), otherwise results are undefined.All values specified by
rowSequenceIterator
that are on the same page as its next row key will be appended todestination
. Row keys are on the same page when the bits outside ofPagingChunkSource.mask()
are identical.- Specified by:
fillChunkAppend
in interfacePagingChunkSource<ATTR extends Any>
- Parameters:
context
- A context containing all mutable/state related data used in fillingdestination
destination
- TheWritableChunk
to append the results torowSequenceIterator
- An iterator over the remaining row keys specifying the values to retrieve, which contains at least the keys to extract from thisPagingChunkSource
-
doFillChunkAppend
@FinalDefault default void doFillChunkAppend(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super ATTR> destination, @NotNull @NotNull RowSequence rowSequence, @NotNull @NotNull Page<INNER_ATTR> page) This is a helper which is the same as a call tofillChunkAppend(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence.Iterator)
, except that some of the initial work has already been done for the first call toPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)
which we don't want to repeat.
-