jolshan commented on a change in pull request #10892:
URL: https://github.com/apache/kafka/pull/10892#discussion_r660164864



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/admin/DeleteTopicsResult.java
##########
@@ -30,24 +31,62 @@
  */
 @InterfaceStability.Evolving
 public class DeleteTopicsResult {
-    final Map<String, KafkaFuture<Void>> futures;
+    private Map<String, KafkaFuture<Void>> nameFutures;
+    private Map<Uuid, KafkaFuture<Void>> topicIdFutures;
 
-    protected DeleteTopicsResult(Map<String, KafkaFuture<Void>> futures) {
-        this.futures = futures;
+    protected DeleteTopicsResult() {}
+
+    private void setNameFutures(Map<String, KafkaFuture<Void>> nameFutures) {
+        this.nameFutures = nameFutures;
+    }
+
+    private void setTopicIdFutures(Map<Uuid, KafkaFuture<Void>> 
topicIdFutures) {
+        this.topicIdFutures = topicIdFutures;
+    }
+
+    protected static DeleteTopicsResult ofTopicNames(Map<String, 
KafkaFuture<Void>> nameFutures) {
+        DeleteTopicsResult result = new DeleteTopicsResult();
+        result.setNameFutures(nameFutures);
+        return result;
+    }
+
+    protected static DeleteTopicsResult ofTopicIds(Map<Uuid, 
KafkaFuture<Void>> topicIdFutures) {
+        DeleteTopicsResult result = new DeleteTopicsResult();
+        result.setTopicIdFutures(topicIdFutures);
+        return result;
+    }
+
+    /**
+     * Return a map from topic names to futures which can be used to check the 
status of
+     * individual deletions if the deleteTopics request used topic names. 
Otherwise return null.

Review comment:
       I was following the convention from this class before, but I can update.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to