K - the key typeV - the value typepublic class Grouped<K,V> extends Object
Serdes and set the part of name used for repartition topics when performing KStream.groupBy(KeyValueMapper, Grouped), KStream.groupByKey(Grouped), or KTable.groupBy(KeyValueMapper, Grouped) operations. Note that Kafka Streams does not always create repartition topics for grouping operations.| Modifier and Type | Method and Description |
|---|---|
static <K,V> Grouped<K,V> | as(String name)Create a Grouped instance with the provided name used as part of the repartition topic if required. |
static <K,V> Grouped<K,V> | keySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)Create a Grouped instance with the provided keySerde. |
static <K,V> Grouped<K,V> | valueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)Create a Grouped instance with the provided valueSerde. |
static <K,V> Grouped<K,V> | with(org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)Create a Grouped instance with the provided keySerde and valueSerde. |
static <K,V> Grouped<K,V> | with(String name, org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)Create a Grouped instance with the provided name, keySerde, and valueSerde. |
Grouped<K,V> | withKeySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)Perform the grouping operation using the provided keySerde for serializing the key. |
Grouped<K,V> | withName(String name)Perform the grouping operation with the name for a repartition topic if required. |
Grouped<K,V> | withValueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)Perform the grouping operation using the provided valueSerde for serializing the value. |
public static <K,V> Grouped<K,V> as(String name)
Grouped instance with the provided name used as part of the repartition topic if required.name - the name used for a repartition topic if requiredGrouped configured with the nameKStream.groupByKey(Grouped), KStream.groupBy(KeyValueMapper, Grouped), KTable.groupBy(KeyValueMapper, Grouped)public static <K,V> Grouped<K,V> keySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)
Grouped instance with the provided keySerde. If null the default key serde from config will be used.keySerde - the Serde used for serializing the key. If null the default key serde from config will be usedGrouped configured with the keySerdeKStream.groupByKey(Grouped), KStream.groupBy(KeyValueMapper, Grouped), KTable.groupBy(KeyValueMapper, Grouped)public static <K,V> Grouped<K,V> valueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)
Grouped instance with the provided valueSerde. If null the default value serde from config will be used.valueSerde - the Serde used for serializing the value. If null the default value serde from config will be usedGrouped configured with the valueSerdeKStream.groupByKey(Grouped), KStream.groupBy(KeyValueMapper, Grouped), KTable.groupBy(KeyValueMapper, Grouped)public static <K,V> Grouped<K,V> with(String name, org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)
Grouped instance with the provided name, keySerde, and valueSerde. If the keySerde and/or the valueSerde is null the default value for the respective serde from config will be used.name - the name used as part of the repartition topic name if requiredkeySerde - the Serde used for serializing the key. If null the default key serde from config will be usedvalueSerde - the Serde used for serializing the value. If null the default value serde from config will be usedGrouped configured with the name, keySerde, and valueSerdeKStream.groupByKey(Grouped), KStream.groupBy(KeyValueMapper, Grouped), KTable.groupBy(KeyValueMapper, Grouped)public static <K,V> Grouped<K,V> with(org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)
Grouped instance with the provided keySerde and valueSerde. If the keySerde and/or the valueSerde is null the default value for the respective serde from config will be used.keySerde - the Serde used for serializing the key. If null the default key serde from config will be usedvalueSerde - the Serde used for serializing the value. If null the default value serde from config will be usedGrouped configured with the keySerde, and valueSerdeKStream.groupByKey(Grouped), KStream.groupBy(KeyValueMapper, Grouped), KTable.groupBy(KeyValueMapper, Grouped)public Grouped<K,V> withName(String name)
name - the name used for the processor name and as part of the repartition topic name if requiredGrouped instance configured with the namepublic Grouped<K,V> withKeySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)
keySerde - Serde to use for serializing the key. If null the default key serde from config will be usedGrouped instance configured with the keySerdepublic Grouped<K,V> withValueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)
valueSerde - Serde to use for serializing the value. If null the default value serde from config will be usedGrouped instance configured with the valueSerde