java.lang.Object
io.deephaven.extensions.barrage.chunk.BaseChunkWriter<SOURCE_CHUNK_TYPE>
io.deephaven.extensions.barrage.chunk.ByteChunkWriter<SOURCE_CHUNK_TYPE>
- All Implemented Interfaces:
ChunkWriter<SOURCE_CHUNK_TYPE>
public class ByteChunkWriter<SOURCE_CHUNK_TYPE extends Chunk<Values>>
extends BaseChunkWriter<SOURCE_CHUNK_TYPE>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.extensions.barrage.chunk.BaseChunkWriter
BaseChunkWriter.BulkIntWriter, BaseChunkWriter.ChunkTransformer<SOURCE_CHUNK_TYPE extends Chunk<Values>>, BaseChunkWriter.ValidityBufferNested classes/interfaces inherited from interface io.deephaven.extensions.barrage.chunk.ChunkWriter
ChunkWriter.BufferListener, ChunkWriter.Context, ChunkWriter.DrainableColumn, ChunkWriter.Factory, ChunkWriter.FieldNodeInfo, ChunkWriter.FieldNodeListener -
Field Summary
Fields inherited from class io.deephaven.extensions.barrage.chunk.BaseChunkWriter
BULK_WRITE_BUFFER_BYTES, dhNullable, elementSize, fieldNullable, PADDING_BUFFER, REMAINDER_MOD_8_MASK -
Constructor Summary
ConstructorsConstructorDescriptionByteChunkWriter(@Nullable BaseChunkWriter.ChunkTransformer<SOURCE_CHUNK_TYPE> transformer, @NotNull Supplier<SOURCE_CHUNK_TYPE> emptyChunkSupplier, boolean fieldNullable) -
Method Summary
Modifier and TypeMethodDescriptionstatic WritableByteChunk<Values> chunkUnboxer(@NotNull ObjectChunk<Byte, Values> sourceValues) protected voidcomputeValidity(@NotNull ChunkWriter.Context context, @NotNull RowSequence subset, @NotNull BaseChunkWriter.ValidityBuffer validity) Report the nullness of each row of the subset, in order, tovalidity.static ByteChunkWriter<ByteChunk<Values>> getIdentity(boolean isNullable) getInputStream(@NotNull ChunkWriter.Context context, @Nullable RowSet subset, @NotNull BarrageOptions options) Get an input stream optionally position-space filtered using the provided RowSet.static ChunkWriter<ObjectChunk<Byte, Values>> makeBoxed(@NotNull ChunkWriter<ByteChunk<Values>> innerWriter) Methods inherited from class io.deephaven.extensions.barrage.chunk.BaseChunkWriter
getEmptyInputStream, getEmptyInputStream, getNumLongsForBitPackOfSize, getValidityMapSerializationSizeFor, isFieldNullable, makeContextMethods 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.ChunkWriter
getInputStream
-
Constructor Details
-
ByteChunkWriter
public ByteChunkWriter(@Nullable @Nullable BaseChunkWriter.ChunkTransformer<SOURCE_CHUNK_TYPE> transformer, @NotNull @NotNull Supplier<SOURCE_CHUNK_TYPE> emptyChunkSupplier, boolean fieldNullable)
-
-
Method Details
-
getIdentity
-
chunkUnboxer
public static WritableByteChunk<Values> chunkUnboxer(@NotNull @NotNull ObjectChunk<Byte, Values> sourceValues) -
makeBoxed
public static ChunkWriter<ObjectChunk<Byte,Values>> makeBoxed(@NotNull @NotNull ChunkWriter<ByteChunk<Values>> innerWriter) -
getInputStream
public ChunkWriter.DrainableColumn getInputStream(@NotNull @NotNull ChunkWriter.Context context, @Nullable @Nullable RowSet subset, @NotNull @NotNull BarrageOptions options) throws IOException Description copied from interface:ChunkWriterGet 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
-
computeValidity
protected void computeValidity(@NotNull @NotNull ChunkWriter.Context context, @NotNull @NotNull RowSequence subset, @NotNull @NotNull BaseChunkWriter.ValidityBuffer validity) Description copied from class:BaseChunkWriterReport the nullness of each row of the subset, in order, tovalidity.This is invoked at most once per
BaseChunkWriter.BaseChunkInputStream: the null count carried by the field node and the bytes of the validity buffer are both derived from this single traversal of the row data.- Specified by:
computeValidityin classBaseChunkWriter<SOURCE_CHUNK_TYPE extends Chunk<Values>>- Parameters:
context- the context for the chunksubset- the subset of rows to considervalidity- the validity buffer to populate
-