Package io.vertx.kafka.admin
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 Summary
Constructors Constructor Description TopicDescription()ConstructorTopicDescriptionβ(boolean isInternal, String name, List<TopicPartitionInfo> partitions, org.apache.kafka.common.Uuid topicId, Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)ConstructorTopicDescriptionβ(JsonObject json)Constructor (from JSON representation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<org.apache.kafka.common.acl.AclOperation>getAuthorizedOperations()StringgetName()List<TopicPartitionInfo>getPartitions()org.apache.kafka.common.UuidgetTopicId()booleanisInternal()TopicDescriptionsetAuthorizedOperationsβ(Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)Set the id of the consumer groupTopicDescriptionsetInternalβ(boolean internal)Set whether the topic is internal to Kafka.TopicDescriptionsetNameβ(String name)Set the name of the topic.TopicDescriptionsetPartitionsβ(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.TopicDescriptionsetTopicIdβ(org.apache.kafka.common.Uuid topicId)Set the id of the topic.JsonObjecttoJson()Convert object to JSON representationStringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-