Class Produced<K,​V>

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Produced​(Produced<K,​V> produced)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      Produced<K,​V>
      as​(java.lang.String processorName)
      Create an instance of Produced with provided processor name.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      static <K,​V>
      Produced<K,​V>
      keySerde​(org.apache.kafka.common.serialization.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​(org.apache.kafka.common.serialization.Serde<V> valueSerde)
      Create a Produced instance with provided valueSerde.
      static <K,​V>
      Produced<K,​V>
      with​(org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)
      Create a Produced instance with provided keySerde and valueSerde.
      static <K,​V>
      Produced<K,​V>
      with​(org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde, StreamPartitioner<? super K,​? super V> partitioner)
      Create a Produced instance with provided keySerde, valueSerde, and partitioner.
      Produced<K,​V> withKeySerde​(org.apache.kafka.common.serialization.Serde<K> keySerde)
      Produce records using the provided keySerde.
      Produced<K,​V> withName​(java.lang.String name)  
      Produced<K,​V> withStreamPartitioner​(StreamPartitioner<? super K,​? super V> partitioner)
      Produce records using the provided partitioner.
      Produced<K,​V> withValueSerde​(org.apache.kafka.common.serialization.Serde<V> valueSerde)
      Produce records using the provided valueSerde.
      • Methods inherited from class java.lang.Object

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

      • keySerde

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

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

        protected java.lang.String processorName
    • Constructor Detail

      • Produced

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

      • with

        public static <K,​V> Produced<K,​V> with​(org.apache.kafka.common.serialization.Serde<K> keySerde,
                                                           org.apache.kafka.common.serialization.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​(org.apache.kafka.common.serialization.Serde<K> keySerde,
                                                           org.apache.kafka.common.serialization.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​(java.lang.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
      • keySerde

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

        public static <K,​V> Produced<K,​V> valueSerde​(org.apache.kafka.common.serialization.Serde<V> valueSerde)
        Create a Produced instance with provided valueSerde.
        Type Parameters:
        K - key type
        V - value type
        Parameters:
        valueSerde - Serde to use for serializing the key
        Returns:
        A new Produced instance configured with valueSerde
        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​(org.apache.kafka.common.serialization.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​(org.apache.kafka.common.serialization.Serde<K> keySerde)
        Produce records using the provided keySerde.
        Parameters:
        keySerde - Serde to use for serializing the key
        Returns:
        this
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • withName

        public Produced<K,​V> withName​(java.lang.String name)