Class TopicDescription


  • public class TopicDescription
    extends java.lang.Object
    A detailed description of a single topic in the cluster.
    • Constructor Summary

      Constructors 
      Constructor Description
      TopicDescription​(java.lang.String name, boolean internal, java.util.List<TopicPartitionInfo> partitions)
      Create an instance with the specified parameters.
      TopicDescription​(java.lang.String name, boolean internal, java.util.List<TopicPartitionInfo> partitions, java.util.Set<AclOperation> authorizedOperations)
      Create an instance with the specified parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<AclOperation> authorizedOperations()
      authorized operations for this topic, or null if this is not known.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      boolean isInternal()
      Whether the topic is internal to Kafka.
      java.lang.String name()
      The name of the topic.
      java.util.List<TopicPartitionInfo> partitions()
      A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • TopicDescription

        public TopicDescription​(java.lang.String name,
                                boolean internal,
                                java.util.List<TopicPartitionInfo> partitions)
        Create an instance with the specified parameters.
        Parameters:
        name - The topic name
        internal - Whether the topic is internal to Kafka
        partitions - A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
      • TopicDescription

        public TopicDescription​(java.lang.String name,
                                boolean internal,
                                java.util.List<TopicPartitionInfo> partitions,
                                java.util.Set<AclOperation> authorizedOperations)
        Create an instance with the specified parameters.
        Parameters:
        name - The topic name
        internal - Whether the topic is internal to Kafka
        partitions - A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
        authorizedOperations - authorized operations for this topic, or null if this is not known.
    • Method Detail

      • 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
      • name

        public java.lang.String name()
        The name of the topic.
      • isInternal

        public boolean isInternal()
        Whether the topic is internal to Kafka. An example of an internal topic is the offsets and group management topic: __consumer_offsets.
      • partitions

        public java.util.List<TopicPartitionInfo> partitions()
        A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
      • authorizedOperations

        public java.util.Set<AclOperation> authorizedOperations()
        authorized operations for this topic, or null if this is not known.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object