Package io.deephaven.generic.page
Class ChunkHolderPageShort<ATTR extends io.deephaven.chunk.attributes.Any>
java.lang.Object
io.deephaven.generic.page.ChunkHolderPageShort<ATTR>
- All Implemented Interfaces:
io.deephaven.engine.page.Page<ATTR>,io.deephaven.engine.page.Page.WithDefaults<ATTR>,io.deephaven.engine.page.PagingChunkSource<ATTR>,io.deephaven.engine.table.ChunkSource<ATTR>,io.deephaven.engine.table.FillContextMaker,io.deephaven.engine.table.GetContextMaker,io.deephaven.engine.table.impl.DefaultChunkSource<ATTR>,io.deephaven.engine.table.impl.DefaultChunkSource.SupportsContiguousGet<ATTR>
public class ChunkHolderPageShort<ATTR extends io.deephaven.chunk.attributes.Any>
extends Object
implements io.deephaven.engine.page.Page.WithDefaults<ATTR>, io.deephaven.engine.table.impl.DefaultChunkSource.SupportsContiguousGet<ATTR>
Append-only
Page implementation that permanently wraps an array for data storage, atomically replacing "view"
chunks with larger ones as the page is extended.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSource
io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.engine.table.ChunkSource.GetContextNested classes/interfaces inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
io.deephaven.engine.table.impl.DefaultChunkSource.SupportsContiguousGet<ATTR extends io.deephaven.chunk.attributes.Any>, io.deephaven.engine.table.impl.DefaultChunkSource.WithPrev<ATTR extends io.deephaven.chunk.attributes.Any>Nested classes/interfaces inherited from interface io.deephaven.engine.page.Page
io.deephaven.engine.page.Page.WithDefaults<ATTR extends io.deephaven.chunk.attributes.Any>, io.deephaven.engine.page.Page.WithDefaultsForRepeatingValues<ATTR extends io.deephaven.chunk.attributes.Any> -
Field Summary
Fields inherited from interface io.deephaven.engine.table.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionChunkHolderPageShort(long mask, long firstRow, @org.jetbrains.annotations.NotNull short[] storage) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidacceptAppend(@NotNull io.deephaven.chunk.ShortChunk<ATTR> slice, int expectedCurrentSize) Accept an appended slice of data to the currently-visible range for this page.final voidfillChunkAppend(@NotNull io.deephaven.engine.table.ChunkSource.FillContext context, @NotNull io.deephaven.chunk.WritableChunk<? super ATTR> destination, @NotNull io.deephaven.engine.rowset.RowSequence rowSequence) final longfinal shortget(long rowKey) final io.deephaven.chunk.Chunk<? extends ATTR>getChunk(@NotNull io.deephaven.engine.table.ChunkSource.GetContext context, long firstKey, long lastKey) final io.deephaven.chunk.ChunkTypefinal io.deephaven.chunk.WritableShortChunk<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()final longmaxRow(long rowKey) final intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunkByFilling, makeGetContextMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.SupportsContiguousGet
getChunkMethods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContextMethods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContextMethods inherited from interface io.deephaven.engine.page.Page
advanceToNextPage, advanceToNextPage, advanceToNextPageAndGetPositionDistance, firstRow, getRowOffsetMethods inherited from interface io.deephaven.engine.page.Page.WithDefaults
fillChunk, fillChunkAppendMethods inherited from interface io.deephaven.engine.page.PagingChunkSource
makeFillContext
-
Constructor Details
-
ChunkHolderPageShort
public ChunkHolderPageShort(long mask, long firstRow, @NotNull @org.jetbrains.annotations.NotNull short[] storage)
-
-
Method Details
-
getChunkType
public final io.deephaven.chunk.ChunkType getChunkType()- Specified by:
getChunkTypein interfaceio.deephaven.engine.table.ChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>
-
firstRowOffset
public final long firstRowOffset()- Specified by:
firstRowOffsetin interfaceio.deephaven.engine.page.Page<ATTR extends io.deephaven.chunk.attributes.Any>
-
maxRow
public final long maxRow(long rowKey) - Specified by:
maxRowin interfaceio.deephaven.engine.page.PagingChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>
-
mask
public final long mask()- Specified by:
maskin interfaceio.deephaven.engine.page.PagingChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>
-
size
public final int size()- Returns:
- The current size of this page
-
get
public final short get(long rowKey) - Parameters:
rowKey- The row key to retrieve the value for- Returns:
- The value at
rowKey
-
getChunk
public final io.deephaven.chunk.Chunk<? extends ATTR> getChunk(@NotNull @NotNull io.deephaven.engine.table.ChunkSource.GetContext context, long firstKey, long lastKey) - Specified by:
getChunkin interfaceio.deephaven.engine.table.ChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>- Specified by:
getChunkin interfaceio.deephaven.engine.table.impl.DefaultChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>- Specified by:
getChunkin interfaceio.deephaven.engine.table.impl.DefaultChunkSource.SupportsContiguousGet<ATTR extends io.deephaven.chunk.attributes.Any>
-
fillChunkAppend
public final void fillChunkAppend(@NotNull @NotNull io.deephaven.engine.table.ChunkSource.FillContext context, @NotNull @NotNull io.deephaven.chunk.WritableChunk<? super ATTR> destination, @NotNull @NotNull io.deephaven.engine.rowset.RowSequence rowSequence) - Specified by:
fillChunkAppendin interfaceio.deephaven.engine.page.Page.WithDefaults<ATTR extends io.deephaven.chunk.attributes.Any>
-
getSliceForAppend
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.- 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
-
acceptAppend
public final void acceptAppend(@NotNull @NotNull io.deephaven.chunk.ShortChunk<ATTR> slice, int expectedCurrentSize) Accept 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 bygetSliceForAppend(int); ownership transfers to the calleeexpectedCurrentSize- The expected current size of the visible data in this page, used to assert correctness
-