Class VarBinaryChunkWriter<T>
java.lang.Object
io.deephaven.extensions.barrage.chunk.BaseChunkWriter<ObjectChunk<T,Values>>
io.deephaven.extensions.barrage.chunk.VarBinaryChunkWriter<T>
- All Implemented Interfaces:
ChunkWriter<ObjectChunk<T,
Values>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static class
final class
Nested classes/interfaces inherited from class io.deephaven.extensions.barrage.chunk.BaseChunkWriter
BaseChunkWriter.ChunkTransformer<SOURCE_CHUNK_TYPE extends Chunk<Values>>, BaseChunkWriter.SerContext
Nested classes/interfaces inherited from interface io.deephaven.extensions.barrage.chunk.ChunkWriter
ChunkWriter.BufferListener, ChunkWriter.DrainableColumn, ChunkWriter.Factory, ChunkWriter.FieldNodeInfo, ChunkWriter.FieldNodeListener
-
Field Summary
Fields inherited from class io.deephaven.extensions.barrage.chunk.BaseChunkWriter
dhNullable, elementSize, fieldNullable, PADDING_BUFFER, REMAINDER_MOD_8_MASK
-
Constructor Summary
ConstructorsConstructorDescriptionVarBinaryChunkWriter
(boolean fieldNullable, VarBinaryChunkWriter.Appender<T> appendItem) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
computeNullCount
(ChunkWriter.Context context, @NotNull RowSequence subset) Compute the number of nulls in the subset.getInputStream
(ChunkWriter.Context context, @Nullable RowSet subset, @NotNull BarrageOptions options) Get an input stream optionally position-space filtered using the provided RowSet.makeContext
(@NotNull ObjectChunk<T, Values> chunk, long rowOffset) Create a context for the given chunk.protected void
writeValidityBufferInternal
(@NotNull ChunkWriter.Context context, @NotNull RowSequence subset, @NotNull BaseChunkWriter.SerContext serContext) Update the validity buffer for the subset.Methods inherited from class io.deephaven.extensions.barrage.chunk.BaseChunkWriter
getEmptyInputStream, getNumLongsForBitPackOfSize, getValidityMapSerializationSizeFor, isFieldNullable
-
Constructor Details
-
VarBinaryChunkWriter
-
-
Method Details
-
getInputStream
public ChunkWriter.DrainableColumn getInputStream(@NotNull ChunkWriter.Context context, @Nullable @Nullable RowSet subset, @NotNull @NotNull BarrageOptions options) throws IOException Description copied from interface:ChunkWriter
Get an input stream optionally position-space filtered using the provided RowSet.- Parameters:
context
- the chunk writer context holding the data to be drained to the clientsubset
- if provided, is a position-space filter of source dataoptions
- options for writing to the stream- Returns:
- a single-use DrainableColumn ready to be drained via grpc
- Throws:
IOException
-
makeContext
public VarBinaryChunkWriter<T>.Context makeContext(@NotNull @NotNull ObjectChunk<T, Values> chunk, long rowOffset) Description copied from interface:ChunkWriter
Create a context for the given chunk.- Specified by:
makeContext
in interfaceChunkWriter<T>
- Overrides:
makeContext
in classBaseChunkWriter<ObjectChunk<T,
Values>> - Parameters:
chunk
- the chunk of data to be writtenrowOffset
- the offset into the logical message potentially spread over multiple chunks- Returns:
- a context for the given chunk
-
computeNullCount
protected int computeNullCount(@NotNull ChunkWriter.Context context, @NotNull @NotNull RowSequence subset) Description copied from class:BaseChunkWriter
Compute the number of nulls in the subset.- Specified by:
computeNullCount
in classBaseChunkWriter<ObjectChunk<T,
Values>> - Parameters:
context
- the context for the chunksubset
- the subset of rows to consider- Returns:
- the number of nulls in the subset
-
writeValidityBufferInternal
protected void writeValidityBufferInternal(@NotNull ChunkWriter.Context context, @NotNull @NotNull RowSequence subset, @NotNull @NotNull BaseChunkWriter.SerContext serContext) Description copied from class:BaseChunkWriter
Update the validity buffer for the subset.- Specified by:
writeValidityBufferInternal
in classBaseChunkWriter<ObjectChunk<T,
Values>> - Parameters:
context
- the context for the chunksubset
- the subset of rows to considerserContext
- the serialization context
-