Class BaseChunkInputStreamGenerator<T extends Chunk<Values>>

java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.extensions.barrage.chunk.BaseChunkInputStreamGenerator<T>
All Implemented Interfaces:
LogOutputAppendable, ChunkInputStreamGenerator, SafeCloseable, AutoCloseable
Direct Known Subclasses:
BooleanChunkInputStreamGenerator, ByteChunkInputStreamGenerator, CharChunkInputStreamGenerator, DoubleChunkInputStreamGenerator, FloatChunkInputStreamGenerator, IntChunkInputStreamGenerator, LongChunkInputStreamGenerator, ShortChunkInputStreamGenerator, VarBinaryChunkInputStreamGenerator, VarListChunkInputStreamGenerator, VectorChunkInputStreamGenerator

public abstract class BaseChunkInputStreamGenerator<T extends Chunk<Values>> extends ReferenceCounted implements ChunkInputStreamGenerator
  • Field Details

    • PADDING_BUFFER

      public static final byte[] PADDING_BUFFER
    • REMAINDER_MOD_8_MASK

      public static final int REMAINDER_MOD_8_MASK
      See Also:
    • chunk

      protected final T extends Chunk<Values> chunk
    • elementSize

      protected final int elementSize
  • Method Details

    • getRowOffset

      public long getRowOffset()
      Description copied from interface: ChunkInputStreamGenerator
      Returns the number of rows that were sent before the first row in this generator.
      Specified by:
      getRowOffset in interface ChunkInputStreamGenerator
    • getLastRowOffset

      public long getLastRowOffset()
      Description copied from interface: ChunkInputStreamGenerator
      Returns the offset of the final row this generator can produce.
      Specified by:
      getLastRowOffset in interface ChunkInputStreamGenerator
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SafeCloseable
    • onReferenceCountAtZero

      protected void onReferenceCountAtZero()
      Description copied from class: ReferenceCounted
      Callback method that will be invoked when the reference count returns to zero.
      Specified by:
      onReferenceCountAtZero in class ReferenceCounted
    • getValidityMapSerializationSizeFor

      protected static int getValidityMapSerializationSizeFor(int numElements)
      Returns expected size of validity map in bytes.
      Parameters:
      numElements - the number of rows
      Returns:
      number of bytes to represent the validity buffer for numElements
    • getNumLongsForBitPackOfSize

      protected static int getNumLongsForBitPackOfSize(int numElements)
      Returns the number of longs needed to represent a single bit per element.
      Parameters:
      numElements - the number of rows
      Returns:
      number of longs needed to represent numElements bits rounded up to the nearest long