java.lang.Object
io.deephaven.extensions.barrage.chunk.BaseChunkInputStreamGenerator<T>
- All Implemented Interfaces:
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 Object
implements ChunkInputStreamGenerator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classNested classes/interfaces inherited from interface io.deephaven.extensions.barrage.chunk.ChunkInputStreamGenerator
ChunkInputStreamGenerator.BufferInfo, ChunkInputStreamGenerator.BufferListener, ChunkInputStreamGenerator.DrainableColumn, ChunkInputStreamGenerator.FieldNodeInfo, ChunkInputStreamGenerator.FieldNodeListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Tprotected final intstatic final byte[]protected static final AtomicIntegerFieldUpdater<BaseChunkInputStreamGenerator>static final int -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longReturns the offset of the final row this generator can produce.protected static intgetNumLongsForBitPackOfSize(int numElements) Returns the number of longs needed to represent a single bit per element.longReturns the number of rows that were sent before the first row in this generator.protected static intgetValidityMapSerializationSizeFor(int numElements) Returns expected size of validity map in bytes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.extensions.barrage.chunk.ChunkInputStreamGenerator
getInputStream
-
Field Details
-
PADDING_BUFFER
public static final byte[] PADDING_BUFFER -
REMAINDER_MOD_8_MASK
public static final int REMAINDER_MOD_8_MASK- See Also:
-
REFERENCE_COUNT_UPDATER
protected static final AtomicIntegerFieldUpdater<BaseChunkInputStreamGenerator> REFERENCE_COUNT_UPDATER -
chunk
-
elementSize
protected final int elementSize
-
-
Method Details
-
getRowOffset
public long getRowOffset()Description copied from interface:ChunkInputStreamGeneratorReturns the number of rows that were sent before the first row in this generator.- Specified by:
getRowOffsetin interfaceChunkInputStreamGenerator
-
getLastRowOffset
public long getLastRowOffset()Description copied from interface:ChunkInputStreamGeneratorReturns the offset of the final row this generator can produce.- Specified by:
getLastRowOffsetin interfaceChunkInputStreamGenerator
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-
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
-