Class DefaultChunkReaderFactory
java.lang.Object
io.deephaven.extensions.barrage.chunk.DefaultChunkReaderFactory
- All Implemented Interfaces:
ChunkReader.Factory
JVM implementation of
ChunkReader.Factory
, suitable for use in Java clients and servers. This default
implementation may not round trip flight types in a stable way, but will round trip Deephaven table definitions and
table data. Neither of these is a required/expected property of being a Flight/Barrage/Deephaven client.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<Class<?>,
DefaultChunkReaderFactory.ChunkReaderFactory> lookupReaderFactory
(org.apache.arrow.vector.types.pojo.ArrowType.ArrowTypeID typeId) <T extends WritableChunk<Values>>
ChunkReader<T>newReader
(@NotNull BarrageTypeInfo<org.apache.arrow.flatbuf.Field> typeInfo, @NotNull BarrageOptions options) Returns aChunkReader
for the specified arguments.<T extends WritableChunk<Values>>
ChunkReader<T>newReaderPojo
(@NotNull BarrageTypeInfo<org.apache.arrow.vector.types.pojo.Field> typeInfo, @NotNull BarrageOptions options, boolean isTopLevel) protected void
register
(org.apache.arrow.vector.types.pojo.ArrowType.ArrowTypeID arrowType, Class<?> deephavenType, DefaultChunkReaderFactory.ChunkReaderFactory chunkReaderFactory) static <T,
WIRE_CHUNK_TYPE extends WritableChunk<Values>, CR extends ChunkReader<WIRE_CHUNK_TYPE>>
ChunkReader<WritableObjectChunk<T,Values>> transformToObject
(CR wireReader, BaseChunkReader.ChunkTransformer<WIRE_CHUNK_TYPE, WritableObjectChunk<T, Values>> wireTransform)
-
Field Details
-
log
-
INSTANCE
-
-
Constructor Details
-
DefaultChunkReaderFactory
protected DefaultChunkReaderFactory()
-
-
Method Details
-
lookupReaderFactory
protected Map<Class<?>,DefaultChunkReaderFactory.ChunkReaderFactory> lookupReaderFactory(org.apache.arrow.vector.types.pojo.ArrowType.ArrowTypeID typeId) -
newReader
public <T extends WritableChunk<Values>> ChunkReader<T> newReader(@NotNull @NotNull BarrageTypeInfo<org.apache.arrow.flatbuf.Field> typeInfo, @NotNull @NotNull BarrageOptions options) Description copied from interface:ChunkReader.Factory
Returns aChunkReader
for the specified arguments.- Specified by:
newReader
in interfaceChunkReader.Factory
- Parameters:
typeInfo
- the type of data to read into a chunkoptions
- options for reading the stream- Returns:
- a ChunkReader based on the given options, factory, and type to read
-
newReaderPojo
public <T extends WritableChunk<Values>> ChunkReader<T> newReaderPojo(@NotNull @NotNull BarrageTypeInfo<org.apache.arrow.vector.types.pojo.Field> typeInfo, @NotNull @NotNull BarrageOptions options, boolean isTopLevel) -
register
protected void register(org.apache.arrow.vector.types.pojo.ArrowType.ArrowTypeID arrowType, Class<?> deephavenType, DefaultChunkReaderFactory.ChunkReaderFactory chunkReaderFactory) -
transformToObject
public static <T,WIRE_CHUNK_TYPE extends WritableChunk<Values>, ChunkReader<WritableObjectChunk<T,CR extends ChunkReader<WIRE_CHUNK_TYPE>> Values>> transformToObject(CR wireReader, BaseChunkReader.ChunkTransformer<WIRE_CHUNK_TYPE, WritableObjectChunk<T, Values>> wireTransform)
-