Package io.vertx.kafka.admin
Class TopicDescription
java.lang.Object
io.vertx.kafka.admin.TopicDescription
A detailed description of a single topic in the cluster
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorTopicDescription(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
Modifier and TypeMethodDescriptionSet<org.apache.kafka.common.acl.AclOperation>getName()org.apache.kafka.common.UuidbooleansetAuthorizedOperations(Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations) Set the id of the consumer groupsetInternal(boolean internal) Set whether the topic is internal to Kafka.Set the name of the topic.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.setTopicId(org.apache.kafka.common.Uuid topicId) Set the id of the topic.toJson()Convert object to JSON representationtoString()
-
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
Constructor (from JSON representation)- Parameters:
json- JSON representation
-
-
Method Details
-
isInternal
public boolean isInternal()- Returns:
- Whether the topic is internal to Kafka.
-
setInternal
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
- Returns:
- The name of the topic.
-
setName
Set the name of the topic.- Parameters:
name- The name of the topic.- Returns:
- current instance of the class to be fluent
-
setTopicId
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
- 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
- Returns:
- A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
-
setPartitions
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
Convert object to JSON representation- Returns:
- JSON representation
-
toString
-