Class TopicIdPartition


  • public class TopicIdPartition
    extends Object
    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 Detail

      • TopicIdPartition

        public TopicIdPartition​(Uuid topicId,
                                TopicPartition topicPartition)
        Create an instance with the provided parameters.
        Parameters:
        topicId - the topic id
        topicPartition - the topic partition
      • TopicIdPartition

        public TopicIdPartition​(Uuid topicId,
                                int partition,
                                String topic)
        Create an instance with the provided parameters.
        Parameters:
        topicId - the topic id
        partition - the partition id
        topic - the topic name or null
    • Method Detail

      • topicId

        public Uuid topicId()
        Returns:
        Universally unique id representing this topic partition.
      • topic

        public String topic()
        Returns:
        the topic name or null if it is unknown.
      • partition

        public int partition()
        Returns:
        the partition id.
      • topicPartition

        public TopicPartition topicPartition()
        Returns:
        Topic partition representing this instance.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object