Package io.deephaven.generic.page
Class ChunkHolderPageChar<ATTR extends Any>
java.lang.Object
io.deephaven.generic.page.ChunkHolderPageChar<ATTR>
- All Implemented Interfaces:
- Page<ATTR>,- Page.WithDefaults<ATTR>,- PagingChunkSource<ATTR>,- ChunkSource<ATTR>,- FillContextMaker,- GetContextMaker,- DefaultChunkSource<ATTR>,- DefaultChunkSource.SupportsContiguousGet<ATTR>
public class ChunkHolderPageChar<ATTR extends Any>
extends Object
implements Page.WithDefaults<ATTR>, DefaultChunkSource.SupportsContiguousGet<ATTR>
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSourceChunkSource.FillContext, ChunkSource.GetContextNested classes/interfaces inherited from interface io.deephaven.engine.table.impl.DefaultChunkSourceDefaultChunkSource.SupportsContiguousGet<ATTR extends Any>, DefaultChunkSource.WithPrev<ATTR extends Any>Nested classes/interfaces inherited from interface io.deephaven.engine.page.PagePage.WithDefaults<ATTR extends Any>, Page.WithDefaultsForRepeatingValues<ATTR extends Any>
- 
Field SummaryFields inherited from interface io.deephaven.engine.table.ChunkSourceDEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
- 
Constructor SummaryConstructorsConstructorDescriptionChunkHolderPageChar(long mask, long firstRow, @org.jetbrains.annotations.NotNull char[] storage) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidacceptAppend(@NotNull CharChunk<ATTR> slice, int expectedCurrentSize) Accept an appended slice of data to the currently-visible range for this page.final voidfillChunkAppend(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull RowSequence rowSequence) Appends the values referenced byorderKeysontodestination.final longfinal charget(long rowKey) 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.final ChunkTypeGet the most suitableChunkTypefor use with this ChunkSource.final WritableCharChunk<ATTR>getSliceForAppend(int expectedCurrentSize) Get a writable chunk slice of this page's data storage, starting at the end of the currently-visible range, to be used for appending new data.final longmask()This mask is applied toRowSequenceswhich are passed intoDefaultChunkSource.getChunk(io.deephaven.engine.table.ChunkSource.GetContext, io.deephaven.engine.rowset.RowSequence),ChunkSource.fillChunk(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence), andPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator).final longmaxRow(long rowKey) ThemaxRowis the greatest possible row key which may be referenced in this ChunkSource.final intsize()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSourcegetChunkByFilling, makeGetContextMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.SupportsContiguousGetgetChunkMethods inherited from interface io.deephaven.engine.table.FillContextMakermakeFillContextMethods inherited from interface io.deephaven.engine.table.GetContextMakermakeGetContextMethods inherited from interface io.deephaven.engine.page.PageadvanceToNextPage, advanceToNextPage, advanceToNextPageAndGetPositionDistance, firstRow, getRowOffsetMethods inherited from interface io.deephaven.engine.page.Page.WithDefaultsfillChunk, fillChunkAppendMethods inherited from interface io.deephaven.engine.page.PagingChunkSourcemakeFillContext
- 
Constructor Details- 
ChunkHolderPageCharpublic ChunkHolderPageChar(long mask, long firstRow, @NotNull @org.jetbrains.annotations.NotNull char[] storage) 
 
- 
- 
Method Details- 
getChunkTypeDescription copied from interface:ChunkSourceGet the most suitableChunkTypefor use with this ChunkSource.- Specified by:
- getChunkTypein interface- ChunkSource<ATTR extends Any>
- Returns:
- The ChunkType
 
- 
firstRowOffsetpublic final long firstRowOffset()- Specified by:
- firstRowOffsetin interface- Page<ATTR extends Any>
- Returns:
- the first row of this page, after applying the PagingChunkSource.mask(), which refers to the first row of this page.
 
- 
maxRowpublic final long maxRow(long rowKey) Description copied from interface:PagingChunkSourceThe maxRowis 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 PagingChunkSourceexits for each page reference. That is, there is only onePagingChunkSourceforRowSequenceswith the same bits outside ofPagingChunkSource.mask().It is also possible to pack multiple, non-overlapping PagingChunkSourcesinto the same page reference. In this case, one typically will want to overridemaxRow. An example such implementation isChunkPage.- Specified by:
- maxRowin interface- PagingChunkSource<ATTR extends Any>
- Parameters:
- rowKey- Any row key contained by this- PagingChunkSource
- Returns:
- The maximum last row key of the page, located in the same way as rowKey
 
- 
maskpublic final long mask()Description copied from interface:PagingChunkSourceThis mask is applied toRowSequenceswhich are passed intoDefaultChunkSource.getChunk(io.deephaven.engine.table.ChunkSource.GetContext, io.deephaven.engine.rowset.RowSequence),ChunkSource.fillChunk(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence), andPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator). This allowsPagingChunkSourcesto be cached and reused even if they are properly relocated in key space.- Specified by:
- maskin interface- PagingChunkSource<ATTR extends Any>
- Returns:
- The mask for this PagingChunkSource, which must be a bitmask representing some number of lower order bits of a long.
 
- 
sizepublic final int size()- Returns:
- The current size of this page
 
- 
getpublic final char get(long rowKey) - Parameters:
- rowKey- The row key to retrieve the value for
- Returns:
- The value at rowKey
 
- 
getChunkpublic final Chunk<? extends ATTR> getChunk(@NotNull @NotNull ChunkSource.GetContext context, long firstKey, long lastKey) Description copied from interface:ChunkSourceSame 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 intermediaryRowSequenceobject.- Specified by:
- getChunkin interface- ChunkSource<ATTR extends Any>
- Specified by:
- getChunkin interface- DefaultChunkSource<ATTR extends Any>
- Specified by:
- getChunkin interface- DefaultChunkSource.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 pool
- firstKey- The beginning key (inclusive) of the range to fetch in the chunk
- lastKey- The last key (inclusive) of the range to fetch in the chunk
 
- 
fillChunkAppendpublic final void fillChunkAppend(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super ATTR> destination, @NotNull @NotNull RowSequence rowSequence) Description copied from interface:Page.WithDefaultsAppends the values referenced byorderKeysontodestination.orderKeysare assumed to be entirely contained on thisPage.- Specified by:
- fillChunkAppendin interface- Page.WithDefaults<ATTR extends Any>
 
- 
getSliceForAppendGet a writable chunk slice of this page's data storage, starting at the end of the currently-visible range, to be used for appending new data.- Parameters:
- expectedCurrentSize- The expected current size of the visible data in this page, used to assert correctness
- Returns:
- A chunk to fill with new data
 
- 
acceptAppendAccept an appended slice of data to the currently-visible range for this page. Ownership ofslicetransfers to the callee.- Parameters:
- slice- The slice chunk of data, which must have been returned by- getSliceForAppend(int); ownership transfers to the callee
- expectedCurrentSize- The expected current size of the visible data in this page, used to assert correctness
 
 
-