public class TopicDescription extends Object
Constructor and Description |
---|
TopicDescription()
Constructor
|
TopicDescription(boolean isInternal,
String name,
List<TopicPartitionInfo> partitions)
Constructor
|
TopicDescription(JsonObject json)
Constructor (from JSON representation)
|
Modifier and Type | Method and Description |
---|---|
String |
getName() |
List<TopicPartitionInfo> |
getPartitions() |
boolean |
isInternal() |
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.
|
JsonObject |
toJson()
Convert object to JSON representation
|
String |
toString() |
public TopicDescription()
public TopicDescription(boolean isInternal, String name, List<TopicPartitionInfo> partitions)
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.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 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 © 2023 Eclipse. All rights reserved.