Package org.apache.kafka.common
Class TopicIdPartition
java.lang.Object
org.apache.kafka.common.TopicIdPartition
This represents universally unique identifier with topic id for a topic partition. This makes sure that topics
recreated with the same name will always have unique topic identifiers.
-
Constructor Summary
ConstructorDescriptionTopicIdPartition
(Uuid topicId, int partition, String topic) Create an instance with the provided parameters.TopicIdPartition
(Uuid topicId, TopicPartition topicPartition) Create an instance with the provided parameters. -
Method Summary
-
Constructor Details
-
TopicIdPartition
Create an instance with the provided parameters.- Parameters:
topicId
- the topic idtopicPartition
- the topic partition
-
TopicIdPartition
Create an instance with the provided parameters.- Parameters:
topicId
- the topic idpartition
- the partition idtopic
- the topic name or null
-
-
Method Details
-
topicId
- Returns:
- Universally unique id representing this topic partition.
-
topic
- Returns:
- the topic name or null if it is unknown.
-
partition
public int partition()- Returns:
- the partition id.
-
topicPartition
- Returns:
- Topic partition representing this instance.
-
equals
-
hashCode
public int hashCode() -
toString
-