Package io.deephaven.kafka.publish
Class JsonKeyOrValueSerializer
java.lang.Object
io.deephaven.kafka.publish.JsonKeyOrValueSerializer
- All Implemented Interfaces:
KeyOrValueSerializer<String>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.kafka.publish.KeyOrValueSerializer
KeyOrValueSerializer.Context
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhandleChunk
(KeyOrValueSerializer.Context context, RowSequence toProcess, boolean previous) Process the given update RowSequence and returns a list of JSON strings, reach representing one row of data.makeContext
(int size) Create a context for callingKeyOrValueSerializer.handleChunk(Context, RowSequence, boolean)
.
-
Field Details
-
nestedObjectDelimiter
-
outputNulls
protected final boolean outputNulls -
fieldProcessors
protected final List<io.deephaven.kafka.publish.JsonKeyOrValueSerializer.JSONFieldProcessor> fieldProcessors
-
-
Constructor Details
-
JsonKeyOrValueSerializer
-
-
Method Details
-
handleChunk
public ObjectChunk<String,Values> handleChunk(KeyOrValueSerializer.Context context, RowSequence toProcess, boolean previous) Process the given update RowSequence and returns a list of JSON strings, reach representing one row of data.- Specified by:
handleChunk
in interfaceKeyOrValueSerializer<String>
- Parameters:
toProcess
- An RowSequence indicating which rows were involvedprevious
- True if this should be performed using the 'previous' data instead of current, as for removals.context
- AKeyOrValueSerializer.Context
created byKeyOrValueSerializer.makeContext(int)
- Returns:
- A List of Strings containing all of the parsed update statements
-
makeContext
Description copied from interface:KeyOrValueSerializer
Create a context for callingKeyOrValueSerializer.handleChunk(Context, RowSequence, boolean)
.- Specified by:
makeContext
in interfaceKeyOrValueSerializer<String>
- Parameters:
size
- The maximum number of rows that will be serialized for each chunk- Returns:
- A Context for the KeyOrValueSerializer
-