merlimat commented on a change in pull request #1380: Refactor REST API for 
namespace policy
URL: https://github.com/apache/incubator-pulsar/pull/1380#discussion_r179352658
 
 

 ##########
 File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
 ##########
 @@ -18,15 +18,52 @@
  */
 package org.apache.pulsar.common.policies.data;
 
+import java.lang.reflect.Type;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.google.common.reflect.TypeToken;
 
 public class Policies {
+    public enum PolicyProperty {
+        BacklogQuotaMap(new TypeToken<Map<BacklogQuota.BacklogQuotaType, 
BacklogQuota>>(){}.getType(), "backlog_quota_map", false),
 
 Review comment:
   Why not reuse the same field name (`backlog_quota_map`, ..) even as REST 
handler, instead of using a different format like `BacklogQuotaMap`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to