Interface BarrageMessageReader
- All Superinterfaces:
AutoCloseable,SafeCloseable
- All Known Implementing Classes:
BarrageMessageReaderImpl
A gRPC streaming reader that keeps stream specific context and converts
InputStreams to
BarrageMessages.
Readers may retain stream-lifetime resources (e.g. dictionary value chunks); call close() when the stream
ends.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()safelyParseFrom(BarrageOptions options, ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, InputStream stream) Converts anInputStreamto aBarrageMessagein the context of the provided parameters.
-
Method Details
-
close
default void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-
safelyParseFrom
BarrageMessage safelyParseFrom(BarrageOptions options, ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, InputStream stream) Converts anInputStreamto aBarrageMessagein the context of the provided parameters.- Parameters:
options- the options related to parsing this messagecolumnChunkTypes- the types to use for each column chunkcolumnTypes- the actual type for the columncomponentTypes- the actual component type for the columnstream- the input stream that holds the message to be parsed- Returns:
- a BarrageMessage filled out by the stream's payload
-