public class TopicDescription extends Object
Constructor and Description |
---|
TopicDescription()
Constructor
|
TopicDescription(boolean isInternal,
String name,
List<TopicPartitionInfo> partitions,
org.apache.kafka.common.Uuid topicId,
Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
Constructor
|
TopicDescription(JsonObject json)
Constructor (from JSON representation)
|
Modifier and Type | Method and Description |
---|---|
Set<org.apache.kafka.common.acl.AclOperation> |
getAuthorizedOperations() |
String |
getName() |
List<TopicPartitionInfo> |
getPartitions() |
org.apache.kafka.common.Uuid |
getTopicId() |
boolean |
isInternal() |
TopicDescription |
setAuthorizedOperations(Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
Set the id of the consumer group
|
TopicDescription |
setInternal(boolean internal)
Set whether the topic is internal to Kafka.
|
TopicDescription |
setName(String name)
Set the name of the topic.
|
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.
|
TopicDescription |
setTopicId(org.apache.kafka.common.Uuid topicId)
Set the id of the topic.
|
JsonObject |
toJson()
Convert object to JSON representation
|
String |
toString() |
public TopicDescription()
public TopicDescription(boolean isInternal, String name, List<TopicPartitionInfo> partitions, org.apache.kafka.common.Uuid topicId, Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
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.public TopicDescription(JsonObject json)
json
- JSON representationpublic boolean isInternal()
public TopicDescription setInternal(boolean internal)
internal
- Whether the topic is internal to Kafka.public String getName()
public TopicDescription setName(String name)
name
- The name of the topic.public TopicDescription setTopicId(org.apache.kafka.common.Uuid topicId)
topicId
- The id of the topic.public org.apache.kafka.common.Uuid getTopicId()
public Set<org.apache.kafka.common.acl.AclOperation> getAuthorizedOperations()
public TopicDescription setAuthorizedOperations(Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
authorizedOperations
- authorizedOperations for this group, or null if that information is not known.public List<TopicPartitionInfo> getPartitions()
public TopicDescription setPartitions(List<TopicPartitionInfo> partitions)
partitions
- A list of partitions where the index represents the partition id and the element
contains leadership and replica information for that partition.public JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.