Class StaticTopicNameExtractor<K,​V>

  • All Implemented Interfaces:
    TopicNameExtractor<K,​V>

    public class StaticTopicNameExtractor<K,​V>
    extends java.lang.Object
    implements TopicNameExtractor<K,​V>
    Static topic name extractor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String topicName  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String extract​(K key, V value, RecordContext recordContext)
      Extracts the topic name to send to.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • topicName

        public final java.lang.String topicName
    • Constructor Detail

      • StaticTopicNameExtractor

        public StaticTopicNameExtractor​(java.lang.String topicName)
    • Method Detail

      • extract

        public java.lang.String extract​(K key,
                                        V value,
                                        RecordContext recordContext)
        Description copied from interface: TopicNameExtractor
        Extracts the topic name to send to. The topic name must already exist, since the Kafka Streams library will not try to automatically create the topic with the extracted name.
        Specified by:
        extract in interface TopicNameExtractor<K,​V>
        Parameters:
        key - the record key
        value - the record value
        recordContext - current context metadata of the record
        Returns:
        the topic name this record should be sent to
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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