chia7712 commented on code in PR #18711:
URL: https://github.com/apache/kafka/pull/18711#discussion_r2008102525


##########
server-common/src/main/java/org/apache/kafka/server/config/ConfigType.java:
##########
@@ -16,19 +16,30 @@
  */
 package org.apache.kafka.server.config;
 
+import java.util.Arrays;
 import java.util.List;
 
 /**
  * Represents all the entities that can be configured.
  */
-public class ConfigType {
-    public static final String TOPIC = "topics";
-    public static final String CLIENT = "clients";
-    public static final String USER = "users";
-    public static final String BROKER = "brokers";
-    public static final String IP = "ips";
-    public static final String CLIENT_METRICS = "client-metrics";
-    public static final String GROUP = "groups";
+public enum ConfigType {
+    TOPIC("topics"),
+    CLIENT("clients"),
+    USER("users"),
+    BROKER("brokers"),
+    IP("ips"),
+    CLIENT_METRICS("client-metrics"),
+    GROUP("groups");
 
-    public static final List<String> ALL = List.of(TOPIC, CLIENT, USER, 
BROKER, IP, CLIENT_METRICS, GROUP);
+    private final String value;
+
+    ConfigType(String value) {
+        this.value = value;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static final List<String> ALL = 
Arrays.stream(ConfigType.values()).map(ConfigType::value).toList();

Review Comment:
   Could you please inline it to `ConfigCommand`?



-- 
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