K - key typeV - value typepublic class Repartitioned<K,V> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Serde<K> |
keySerde |
protected String |
name |
protected Integer |
numberOfPartitions |
protected StreamPartitioner<K,V> |
partitioner |
protected Serde<V> |
valueSerde |
| Modifier | Constructor and Description |
|---|---|
protected |
Repartitioned(Repartitioned<K,V> repartitioned) |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Repartitioned<K,V> |
as(String name)
Create a
Repartitioned instance with the provided name used as part of the repartition topic. |
static <K,V> Repartitioned<K,V> |
numberOfPartitions(int numberOfPartitions)
Create a
Repartitioned instance with provided number of partitions for repartition topic. |
static <K,V> Repartitioned<K,V> |
streamPartitioner(StreamPartitioner<K,V> partitioner)
Create a
Repartitioned instance with provided partitioner. |
static <K,V> Repartitioned<K,V> |
with(Serde<K> keySerde,
Serde<V> valueSerde)
Create a
Repartitioned instance with provided key serde and value serde. |
Repartitioned<K,V> |
withKeySerde(Serde<K> keySerde)
Create a new instance of
Repartitioned with the provided key serde. |
Repartitioned<K,V> |
withName(String name)
Create a new instance of
Repartitioned with the provided name used as part of repartition topic and processor name. |
Repartitioned<K,V> |
withNumberOfPartitions(int numberOfPartitions)
Create a new instance of
Repartitioned with the provided number of partitions for repartition topic. |
Repartitioned<K,V> |
withStreamPartitioner(StreamPartitioner<K,V> partitioner)
Create a new instance of
Repartitioned with the provided partitioner. |
Repartitioned<K,V> |
withValueSerde(Serde<V> valueSerde)
Create a new instance of
Repartitioned with the provided value serde. |
protected final String name
protected final Integer numberOfPartitions
protected final StreamPartitioner<K,V> partitioner
protected Repartitioned(Repartitioned<K,V> repartitioned)
public static <K,V> Repartitioned<K,V> as(String name)
Repartitioned instance with the provided name used as part of the repartition topic.K - key typeV - value typename - the name used as a processor named and part of the repartition topic name.Repartitioned instance configured with processor name and repartition topic nameKStream.repartition(Repartitioned)public static <K,V> Repartitioned<K,V> with(Serde<K> keySerde, Serde<V> valueSerde)
Repartitioned instance with provided key serde and value serde.K - key typeV - value typekeySerde - Serde to use for serializing the keyvalueSerde - Serde to use for serializing the valueRepartitioned instance configured with key serde and value serdeKStream.repartition(Repartitioned)public static <K,V> Repartitioned<K,V> streamPartitioner(StreamPartitioner<K,V> partitioner)
Repartitioned instance with provided 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 DefaultStreamPartitioner will be usedRepartitioned instance configured with partitionerKStream.repartition(Repartitioned)public static <K,V> Repartitioned<K,V> numberOfPartitions(int numberOfPartitions)
Repartitioned instance with provided number of partitions for repartition topic.K - key typeV - value typenumberOfPartitions - number of partitions used when creating repartition topicRepartitioned instance configured number of partitionsKStream.repartition(Repartitioned)public Repartitioned<K,V> withName(String name)
Repartitioned with the provided name used as part of repartition topic and processor name.name - the name used for the processor name and as part of the repartition topicRepartitioned instance configured with the namepublic Repartitioned<K,V> withNumberOfPartitions(int numberOfPartitions)
Repartitioned with the provided number of partitions for repartition topic.numberOfPartitions - the name used for the processor name and as part of the repartition topic nameRepartitioned instance configured with the number of partitionspublic Repartitioned<K,V> withKeySerde(Serde<K> keySerde)
Repartitioned with the provided key serde.keySerde - Serde to use for serializing the keyRepartitioned instance configured with the key serdepublic Repartitioned<K,V> withValueSerde(Serde<V> valueSerde)
Repartitioned with the provided value serde.valueSerde - Serde to use for serializing the valueRepartitioned instance configured with the value serdepublic Repartitioned<K,V> withStreamPartitioner(StreamPartitioner<K,V> partitioner)
Repartitioned with the provided 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 DefaultStreamPartitioner will be usedRepartitioned instance configured with provided partitioner