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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classNested classes/interfaces inherited from interface io.deephaven.extensions.barrage.chunk.ChunkInputStreamGenerator
ChunkInputStreamGenerator.BufferListener, ChunkInputStreamGenerator.DrainableColumn, ChunkInputStreamGenerator.Factory, ChunkInputStreamGenerator.FieldNodeInfo, ChunkInputStreamGenerator.FieldNodeListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Tprotected final intstatic final byte[]static final intFields inherited from interface io.deephaven.extensions.barrage.chunk.ChunkInputStreamGenerator
MAX_LOCAL_DATE_VALUE, MIN_LOCAL_DATE_VALUE, MS_PER_DAY -
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.protected voidCallback method that will be invoked when the reference count returns to zero.Methods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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:
-
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
-
onReferenceCountAtZero
protected void onReferenceCountAtZero()Description copied from class:ReferenceCountedCallback method that will be invoked when the reference count returns to zero.- Specified by:
onReferenceCountAtZeroin classReferenceCounted
-
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
-