Class ChunkHolderPageByte<ATTR extends io.deephaven.chunk.attributes.Any>

java.lang.Object
io.deephaven.generic.page.ChunkHolderPageByte<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 ChunkHolderPageByte<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.GetContext

    Nested 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

    Constructors
    Constructor
    Description
    ChunkHolderPageByte(long mask, long firstRow, @org.jetbrains.annotations.NotNull byte[] storage)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    acceptAppend(@NotNull io.deephaven.chunk.ByteChunk<ATTR> slice, int expectedCurrentSize)
    Accept an appended slice of data to the currently-visible range for this page.
    final void
    fillChunkAppend(@NotNull io.deephaven.engine.table.ChunkSource.FillContext context, @NotNull io.deephaven.chunk.WritableChunk<? super ATTR> destination, @NotNull io.deephaven.engine.rowset.RowSequence rowSequence)
     
    final long
     
    final byte
    get(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.ChunkType
     
    final io.deephaven.chunk.WritableByteChunk<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 long
     
    final long
    maxRow(long rowKey)
     
    final int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    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, getRowOffset

    Methods inherited from interface io.deephaven.engine.page.Page.WithDefaults

    fillChunk, fillChunkAppend

    Methods inherited from interface io.deephaven.engine.page.PagingChunkSource

    makeFillContext
  • Constructor Details

    • ChunkHolderPageByte

      public ChunkHolderPageByte(long mask, long firstRow, @NotNull @org.jetbrains.annotations.NotNull byte[] storage)
  • Method Details

    • getChunkType

      public final io.deephaven.chunk.ChunkType getChunkType()
      Specified by:
      getChunkType in interface io.deephaven.engine.table.ChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>
    • firstRowOffset

      public final long firstRowOffset()
      Specified by:
      firstRowOffset in interface io.deephaven.engine.page.Page<ATTR extends io.deephaven.chunk.attributes.Any>
    • maxRow

      public final long maxRow(long rowKey)
      Specified by:
      maxRow in interface io.deephaven.engine.page.PagingChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>
    • mask

      public final long mask()
      Specified by:
      mask in interface io.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 byte 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:
      getChunk in interface io.deephaven.engine.table.ChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>
      Specified by:
      getChunk in interface io.deephaven.engine.table.impl.DefaultChunkSource<ATTR extends io.deephaven.chunk.attributes.Any>
      Specified by:
      getChunk in interface io.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:
      fillChunkAppend in interface io.deephaven.engine.page.Page.WithDefaults<ATTR extends io.deephaven.chunk.attributes.Any>
    • getSliceForAppend

      public final io.deephaven.chunk.WritableByteChunk<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.
      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.ByteChunk<ATTR> slice, int expectedCurrentSize)
      Accept an appended slice of data to the currently-visible range for this page. Ownership of slice transfers 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