public class TupleSerdes extends Object
Currently supports creating a serde for Tuple2<A, B>
whenever a serde for A
and B
is available.
Constructor and Description |
---|
TupleSerdes() |
Modifier and Type | Method and Description |
---|---|
static <A,B> org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.internal.util.Tuple2<A,B>> |
tuple2(org.apache.kafka.common.serialization.Serde<A> serdeA,
org.apache.kafka.common.serialization.Serde<B> serdeB)
A utility method for creating a serde on-the-fly for a pair
Tuple2<A, B> whenever a serde is available for A and B . |
public static <A,B> org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.internal.util.Tuple2<A,B>> tuple2(org.apache.kafka.common.serialization.Serde<A> serdeA, org.apache.kafka.common.serialization.Serde<B> serdeB)
Tuple2<A, B>
whenever a serde is available for A
and B
.
This is particularly useful for KStream joins where the join function pairs the input streams stream.
The serde is not required to perform the join, but will be required on subsequent operations on the joined stream.
A
- the first type parameterB
- the second type parameterserdeA
- the serde for type A
serdeB
- the serde for type B
Tuple2<A, B>
Copyright © 2019. All rights reserved.