You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/05 06:41:36 UTC

[GitHub] [pulsar] hangc0276 commented on a change in pull request #10818: Make client-admin-api to use interfaces with builders instead of POJOs

hangc0276 commented on a change in pull request #10818:
URL: https://github.com/apache/pulsar/pull/10818#discussion_r645951682



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/TenantInfo.java
##########
@@ -19,13 +19,20 @@
 package org.apache.pulsar.common.policies.data;
 
 import java.util.Set;
+import org.apache.pulsar.client.admin.utils.ReflectionUtils;
 
 public interface TenantInfo {
     Set<String> getAdminRoles();
 
-    void setAdminRoles(Set<String> adminRoles);
-
     Set<String> getAllowedClusters();
 
-    void setAllowedClusters(Set<String> allowedClusters);
+    interface Builder {
+        Builder adminRoles(Set<String> adminRoles);
+        Builder allowedClusters(Set<String> allowedClusters);
+        TenantInfo build();
+    }
+
+    static Builder builder() {
+        return ReflectionUtils.newBuilder("org.apache.pulsar.common.policies.data.TenantInfoImpl");

Review comment:
       Whether should we put `rg.apache.pulsar.common.policies.data.TenantInfoImpl` into `pulsar-client-admin-api` module instead of `pulsar-common`?




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

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