Class StaticTopicNameExtractor<K,V>
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.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.StringtopicName
-
Constructor Summary
Constructors Constructor Description StaticTopicNameExtractor(java.lang.String topicName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.Stringextract(K key, V value, RecordContext recordContext)Extracts the topic name to send to.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
extract
public java.lang.String extract(K key, V value, RecordContext recordContext)
Description copied from interface:TopicNameExtractorExtracts 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:
extractin interfaceTopicNameExtractor<K,V>- Parameters:
key- the record keyvalue- the record valuerecordContext- current context metadata of the record- Returns:
- the topic name this record should be sent to
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-