Package org.apache.kafka.clients.admin
Class TopicDescription
- java.lang.Object
-
- org.apache.kafka.clients.admin.TopicDescription
-
public class TopicDescription extends Object
A detailed description of a single topic in the cluster.
-
-
Constructor Summary
Constructors Constructor Description TopicDescription(String name, boolean internal, List<TopicPartitionInfo> partitions)Create an instance with the specified parameters.TopicDescription(String name, boolean internal, List<TopicPartitionInfo> partitions, Set<AclOperation> authorizedOperations)Create an instance with the specified parameters.TopicDescription(String name, boolean internal, List<TopicPartitionInfo> partitions, Set<AclOperation> authorizedOperations, Uuid topicId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<AclOperation>authorizedOperations()authorized operations for this topic, or null if this is not known.booleanequals(Object o)inthashCode()booleanisInternal()Whether the topic is internal to Kafka.Stringname()The name of the topic.List<TopicPartitionInfo>partitions()A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.UuidtopicId()StringtoString()
-
-
-
Constructor Detail
-
TopicDescription
public TopicDescription(String name, boolean internal, List<TopicPartitionInfo> partitions)
Create an instance with the specified parameters.- Parameters:
name- The topic nameinternal- Whether the topic is internal to Kafkapartitions- A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
-
TopicDescription
public TopicDescription(String name, boolean internal, List<TopicPartitionInfo> partitions, Set<AclOperation> authorizedOperations)
Create an instance with the specified parameters.- Parameters:
name- The topic nameinternal- Whether the topic is internal to Kafkapartitions- A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.authorizedOperations- authorized operations for this topic, or null if this is not known.
-
TopicDescription
public TopicDescription(String name, boolean internal, List<TopicPartitionInfo> partitions, Set<AclOperation> authorizedOperations, Uuid topicId)
-
-
Method Detail
-
name
public String name()
The name of the topic.
-
isInternal
public boolean isInternal()
Whether the topic is internal to Kafka. An example of an internal topic is the offsets and group management topic: __consumer_offsets.
-
topicId
public Uuid topicId()
-
partitions
public List<TopicPartitionInfo> partitions()
A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
-
authorizedOperations
public Set<AclOperation> authorizedOperations()
authorized operations for this topic, or null if this is not known.
-
-