Class Produced<K,​V>

    • Field Detail

      • keySerde

        protected Serde<K> keySerde
      • valueSerde

        protected Serde<V> valueSerde
      • processorName

        protected String processorName
    • Constructor Detail

      • Produced

        protected Produced​(Produced<K,​V> produced)
    • Method Detail

      • with

        public static <K,​V> Produced<K,​V> with​(Serde<K> keySerde,
                                                           Serde<V> valueSerde)
        Create a Produced instance with provided keySerde and valueSerde.
        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 Produced instance configured with keySerde and valueSerde
        See Also:
        KStream.through(String, Produced), KStream.to(String, Produced)
      • with

        public 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.
        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
        partitioner - 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 used
        Returns:
        A new Produced instance configured with keySerde, valueSerde, and partitioner
        See Also:
        KStream.through(String, Produced), KStream.to(String, Produced)
      • as

        public static <K,​V> Produced<K,​V> as​(String processorName)
        Create an instance of Produced with provided processor name.
        Type Parameters:
        K - key type
        V - value type
        Parameters:
        processorName - the processor name to be used. If null a default processor name will be generated
        Returns:
        a new instance of Produced
      • streamPartitioner

        public static <K,​V> Produced<K,​V> streamPartitioner​(StreamPartitioner<? super K,​? super V> partitioner)
        Create a Produced 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 Produced instance configured with partitioner
        See Also:
        KStream.through(String, Produced), KStream.to(String, Produced)
      • withStreamPartitioner

        public Produced<K,​V> withStreamPartitioner​(StreamPartitioner<? super K,​? super V> partitioner)
        Produce records using 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:
        this
      • withValueSerde

        public Produced<K,​V> withValueSerde​(Serde<V> valueSerde)
        Produce records using the provided valueSerde.
        Parameters:
        valueSerde - Serde to use for serializing the value
        Returns:
        this
      • withKeySerde

        public Produced<K,​V> withKeySerde​(Serde<K> keySerde)
        Produce records using the provided keySerde.
        Parameters:
        keySerde - Serde to use for serializing the key
        Returns:
        this
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object