Class TopicDescription

java.lang.Object
org.apache.kafka.clients.admin.TopicDescription

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

    Constructors
    Constructor
    Description
    TopicDescription(String name, boolean internal, List<org.apache.kafka.common.TopicPartitionInfo> partitions)
    Create an instance with the specified parameters.
    TopicDescription(String name, boolean internal, List<org.apache.kafka.common.TopicPartitionInfo> partitions, Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
    Create an instance with the specified parameters.
    TopicDescription(String name, boolean internal, List<org.apache.kafka.common.TopicPartitionInfo> partitions, Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations, org.apache.kafka.common.Uuid topicId)
    Create an instance with the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<org.apache.kafka.common.acl.AclOperation>
    authorized operations for this topic, or null if this is not known.
    boolean
     
    int
     
    boolean
    Whether the topic is internal to Kafka.
    The name of the topic.
    List<org.apache.kafka.common.TopicPartitionInfo>
    A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
    org.apache.kafka.common.Uuid
     
     

    Methods inherited from class java.lang.Object

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

    • TopicDescription

      public TopicDescription(String name, boolean internal, List<org.apache.kafka.common.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(String name, boolean internal, List<org.apache.kafka.common.TopicPartitionInfo> partitions, Set<org.apache.kafka.common.acl.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 empty set if this is not known.
    • TopicDescription

      public TopicDescription(String name, boolean internal, List<org.apache.kafka.common.TopicPartitionInfo> partitions, Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations, org.apache.kafka.common.Uuid topicId)
      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 empty set if this is not known.
      topicId - the topic id
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • name

      public 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.
    • topicId

      public org.apache.kafka.common.Uuid topicId()
    • partitions

      public List<org.apache.kafka.common.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 Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations()
      authorized operations for this topic, or null if this is not known.
    • toString

      public String toString()
      Overrides:
      toString in class Object