K
- key typeV
- value typepublic class Produced<K,V> extends 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 String |
processorName |
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> |
as(String processorName)
Create an instance of
Produced with provided processor name. |
boolean |
equals(Object o) |
int |
hashCode() |
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> |
withName(String name)
Sets the name to be used for an operation.
|
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
protected String processorName
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
will be usedProduced
instance configured with keySerde, valueSerde, and partitionerKStream.through(String, Produced)
,
KStream.to(String, Produced)
public static <K,V> Produced<K,V> as(String processorName)
Produced
with provided processor name.K
- key typeV
- value typeprocessorName
- the processor name to be used. If null
a default processor name will be generatedProduced
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 valuepublic Produced<K,V> withKeySerde(Serde<K> keySerde)
keySerde
- Serde to use for serializing the key