Class TopicDescription

java.lang.Object
io.vertx.kafka.admin.TopicDescription

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

    • TopicDescription

      public TopicDescription()
      Constructor
    • TopicDescription

      public TopicDescription(boolean isInternal, String name, List<TopicPartitionInfo> partitions, org.apache.kafka.common.Uuid topicId, Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
      Constructor
      Parameters:
      isInternal - Whether the topic is internal to Kafka.
      name - The name of the topic.
      partitions - A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
      topicId - Uuid for the topic.
      authorizedOperations - Authorized operations for this topic, or null if this is not known.
    • TopicDescription

      public TopicDescription(JsonObject json)
      Constructor (from JSON representation)
      Parameters:
      json - JSON representation
  • Method Details

    • isInternal

      public boolean isInternal()
      Returns:
      Whether the topic is internal to Kafka.
    • setInternal

      public TopicDescription setInternal(boolean internal)
      Set whether the topic is internal to Kafka.
      Parameters:
      internal - Whether the topic is internal to Kafka.
      Returns:
      current instance of the class to be fluent
    • getName

      public String getName()
      Returns:
      The name of the topic.
    • setName

      public TopicDescription setName(String name)
      Set the name of the topic.
      Parameters:
      name - The name of the topic.
      Returns:
      current instance of the class to be fluent
    • setTopicId

      public TopicDescription setTopicId(org.apache.kafka.common.Uuid topicId)
      Set the id of the topic.
      Parameters:
      topicId - The id of the topic.
      Returns:
      current instance of the class to be fluent
    • getTopicId

      public org.apache.kafka.common.Uuid getTopicId()
      Returns:
      The id of the topic.
    • getAuthorizedOperations

      public Set<org.apache.kafka.common.acl.AclOperation> getAuthorizedOperations()
      Returns:
      authorizedOperations authorizedOperations for this group, or null if that information is not known.
    • setAuthorizedOperations

      public TopicDescription setAuthorizedOperations(Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
      Set the id of the consumer group
      Parameters:
      authorizedOperations - authorizedOperations for this group, or null if that information is not known.
      Returns:
      current instance of the class to be fluent
    • getPartitions

      public List<TopicPartitionInfo> getPartitions()
      Returns:
      A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
    • setPartitions

      public TopicDescription setPartitions(List<TopicPartitionInfo> partitions)
      Set A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
      Parameters:
      partitions - A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
      Returns:
      current instance of the class to be fluent
    • toJson

      public JsonObject toJson()
      Convert object to JSON representation
      Returns:
      JSON representation
    • toString

      public String toString()
      Overrides:
      toString in class Object