K
- key typeV
- value typepublic class Produced<K,V>
extends java.lang.Object
KStream.through(String, Produced)
or KStream.to(String, Produced)
.Modifier and Type | Field and Description |
---|---|
protected Serde<K> |
keySerde |
protected StreamPartitioner<? super K,? super V> |
partitioner |
protected Serde<V> |
valueSerde |
Modifier | Constructor and Description |
---|---|
protected |
Produced(Produced<K,V> produced) |
Modifier and Type | Method and Description |
---|---|
static <K,V> Produced<K,V> |
keySerde(Serde<K> keySerde)
Create a Produced instance with provided keySerde.
|
static <K,V> Produced<K,V> |
streamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
Create a Produced instance with provided partitioner.
|
static <K,V> Produced<K,V> |
valueSerde(Serde<V> valueSerde)
Create a Produced instance with provided valueSerde.
|
static <K,V> Produced<K,V> |
with(Serde<K> keySerde,
Serde<V> valueSerde)
Create a Produced instance with provided keySerde and valueSerde.
|
static <K,V> Produced<K,V> |
with(Serde<K> keySerde,
Serde<V> valueSerde,
StreamPartitioner<? super K,? super V> partitioner)
Create a Produced instance with provided keySerde, valueSerde, and partitioner.
|
Produced<K,V> |
withKeySerde(Serde<K> keySerde)
Produce records using the provided keySerde.
|
Produced<K,V> |
withStreamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
Produce records using the provided partitioner.
|
Produced<K,V> |
withValueSerde(Serde<V> valueSerde)
Produce records using the provided valueSerde.
|
protected StreamPartitioner<? super K,? super V> partitioner
public static <K,V> Produced<K,V> with(Serde<K> keySerde, Serde<V> valueSerde)
K
- key typeV
- value typekeySerde
- Serde to use for serializing the keyvalueSerde
- Serde to use for serializing the valueProduced
instance configured with keySerde and valueSerdeKStream.through(String, Produced)
,
KStream.to(String, Produced)
public static <K,V> Produced<K,V> with(Serde<K> keySerde, Serde<V> valueSerde, StreamPartitioner<? super K,? super V> partitioner)
K
- key typeV
- value typekeySerde
- Serde to use for serializing the keyvalueSerde
- Serde to use for serializing the valuepartitioner
- the function used to determine how records are distributed among partitions of the topic,
if not specified and keySerde
provides a WindowedSerializer
for the key
WindowedStreamPartitioner
will be used—otherwise DefaultPartitioner
wil be usedProduced
instance configured with keySerde, valueSerde, and partitionerKStream.through(String, Produced)
,
KStream.to(String, Produced)
public static <K,V> Produced<K,V> keySerde(Serde<K> keySerde)
K
- key typeV
- value typekeySerde
- Serde to use for serializing the keyProduced
instance configured with keySerdeKStream.through(String, Produced)
,
KStream.to(String, Produced)
public static <K,V> Produced<K,V> valueSerde(Serde<V> valueSerde)
K
- key typeV
- value typevalueSerde
- Serde to use for serializing the keyProduced
instance configured with valueSerdeKStream.through(String, Produced)
,
KStream.to(String, Produced)
public static <K,V> Produced<K,V> streamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
K
- key typeV
- value typepartitioner
- the function used to determine how records are distributed among partitions of the topic,
if not specified and the key serde provides a WindowedSerializer
for the key
WindowedStreamPartitioner
will be used—otherwise DefaultPartitioner
will be usedProduced
instance configured with partitionerKStream.through(String, Produced)
,
KStream.to(String, Produced)
public Produced<K,V> withStreamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
partitioner
- the function used to determine how records are distributed among partitions of the topic,
if not specified and the key serde provides a WindowedSerializer
for the key
WindowedStreamPartitioner
will be used—otherwise DefaultPartitioner
wil be usedpublic Produced<K,V> withValueSerde(Serde<V> valueSerde)
valueSerde
- Serde to use for serializing the value