Class Repartitioned<K,​V>

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      Repartitioned<K,​V>
      as​(java.lang.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​(org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)
      Create a Repartitioned instance with provided key serde and value serde.
      Repartitioned<K,​V> withKeySerde​(org.apache.kafka.common.serialization.Serde<K> keySerde)
      Create a new instance of Repartitioned with the provided key serde.
      Repartitioned<K,​V> withName​(java.lang.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​(org.apache.kafka.common.serialization.Serde<V> valueSerde)
      Create a new instance of Repartitioned with the provided value serde.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected final java.lang.String name
      • keySerde

        protected final org.apache.kafka.common.serialization.Serde<K> keySerde
      • valueSerde

        protected final org.apache.kafka.common.serialization.Serde<V> valueSerde
      • numberOfPartitions

        protected final java.lang.Integer numberOfPartitions
    • Constructor Detail

      • Repartitioned

        protected Repartitioned​(Repartitioned<K,​V> repartitioned)
    • Method Detail

      • as

        public static <K,​V> Repartitioned<K,​V> as​(java.lang.String name)
        Create a Repartitioned instance with the provided name used as part of the repartition topic.
        Type Parameters:
        K - key type
        V - value type
        Parameters:
        name - the name used as a processor named and part of the repartition topic name.
        Returns:
        A new Repartitioned instance configured with processor name and repartition topic name
        See Also:
        KStream.repartition(Repartitioned)
      • with

        public static <K,​V> Repartitioned<K,​V> with​(org.apache.kafka.common.serialization.Serde<K> keySerde,
                                                                org.apache.kafka.common.serialization.Serde<V> valueSerde)
        Create a Repartitioned instance with provided key serde and value serde.
        Type Parameters:
        K - key type
        V - value type
        Parameters:
        keySerde - Serde to use for serializing the key
        valueSerde - Serde to use for serializing the value
        Returns:
        A new Repartitioned instance configured with key serde and value serde
        See Also:
        KStream.repartition(Repartitioned)
      • streamPartitioner

        public static <K,​V> Repartitioned<K,​V> streamPartitioner​(StreamPartitioner<K,​V> partitioner)
        Create a Repartitioned instance with provided partitioner.
        Type Parameters:
        K - key type
        V - value type
        Parameters:
        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 will be used
        Returns:
        A new Repartitioned instance configured with partitioner
        See Also:
        KStream.repartition(Repartitioned)
      • numberOfPartitions

        public static <K,​V> Repartitioned<K,​V> numberOfPartitions​(int numberOfPartitions)
        Create a Repartitioned instance with provided number of partitions for repartition topic.
        Type Parameters:
        K - key type
        V - value type
        Parameters:
        numberOfPartitions - number of partitions used when creating repartition topic
        Returns:
        A new Repartitioned instance configured number of partitions
        See Also:
        KStream.repartition(Repartitioned)
      • withName

        public Repartitioned<K,​V> withName​(java.lang.String name)
        Create a new instance of Repartitioned with the provided name used as part of repartition topic and processor name.
        Parameters:
        name - the name used for the processor name and as part of the repartition topic
        Returns:
        a new Repartitioned instance configured with the name
      • withNumberOfPartitions

        public Repartitioned<K,​V> withNumberOfPartitions​(int numberOfPartitions)
        Create a new instance of Repartitioned with the provided number of partitions for repartition topic.
        Parameters:
        numberOfPartitions - the name used for the processor name and as part of the repartition topic name
        Returns:
        a new Repartitioned instance configured with the number of partitions
      • withKeySerde

        public Repartitioned<K,​V> withKeySerde​(org.apache.kafka.common.serialization.Serde<K> keySerde)
        Create a new instance of Repartitioned with the provided key serde.
        Parameters:
        keySerde - Serde to use for serializing the key
        Returns:
        a new Repartitioned instance configured with the key serde
      • withValueSerde

        public Repartitioned<K,​V> withValueSerde​(org.apache.kafka.common.serialization.Serde<V> valueSerde)
        Create a new instance of Repartitioned with the provided value serde.
        Parameters:
        valueSerde - Serde to use for serializing the value
        Returns:
        a new Repartitioned instance configured with the value serde
      • withStreamPartitioner

        public Repartitioned<K,​V> withStreamPartitioner​(StreamPartitioner<K,​V> partitioner)
        Create a new instance of Repartitioned with the provided partitioner.
        Parameters:
        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 used
        Returns:
        a new Repartitioned instance configured with provided partitioner