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
Modifier and TypeClassDescriptionprotected static final class
Nested classes/interfaces inherited from interface io.deephaven.extensions.barrage.chunk.ChunkInputStreamGenerator
ChunkInputStreamGenerator.BufferListener, ChunkInputStreamGenerator.DrainableColumn, ChunkInputStreamGenerator.Factory, ChunkInputStreamGenerator.FieldNodeInfo, ChunkInputStreamGenerator.FieldNodeListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected final T
protected final int
static final byte[]
static final int
Fields inherited from interface io.deephaven.extensions.barrage.chunk.ChunkInputStreamGenerator
MAX_LOCAL_DATE_VALUE, MIN_LOCAL_DATE_VALUE, MS_PER_DAY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
Returns the offset of the final row this generator can produce.protected static int
getNumLongsForBitPackOfSize
(int numElements) Returns the number of longs needed to represent a single bit per element.long
Returns the number of rows that were sent before the first row in this generator.protected static int
getValidityMapSerializationSizeFor
(int numElements) Returns expected size of validity map in bytes.protected void
Callback 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, tryIncrementReferenceCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:ChunkInputStreamGenerator
Returns the number of rows that were sent before the first row in this generator.- Specified by:
getRowOffset
in interfaceChunkInputStreamGenerator
-
getLastRowOffset
public long getLastRowOffset()Description copied from interface:ChunkInputStreamGenerator
Returns the offset of the final row this generator can produce.- Specified by:
getLastRowOffset
in interfaceChunkInputStreamGenerator
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-
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 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
-