Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We will introduce new API methods to AdminClient to describe all topics. 


Code Block
languagejava
titleAdminClient.java
/**
 * Describe all topics in the cluster, with the default options.
 */
public DescribeAllTopicsResult describeTopics() {
    return describeTopics(new DescribeTopicsOptions());
}

/**
 * Describe all topics in the cluster.
 *
 * @return                  The DescribeAllTopicsResult.
 */
public abstract DescribeAllTopicsResult describeTopics(DescribeTopicsOptions options);

...

New result class "DescribeAllTopicsResult" will be added.


Code Block
languagejava
titleDescribeAllTopicsResult
/**
 * The result of the {@link KafkaAdminClient#describeTopics()} call.
 */
public class DescribeAllTopicsResult {
    private final KafkaFuture<Collection<TopicDescription>> future;

    DescribeAllTopicsResult(KafkaFuture<Collection<TopicDescription>> future) {
        this.future = future;
    }

    public KafkaFuture<Collection<TopicDescription>> value() {
        return future;
    }
}

...