hangc0276 commented on a change in pull request #7863:
URL: https://github.com/apache/pulsar/pull/7863#discussion_r475166741
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java
##########
@@ -329,5 +337,15 @@ Boolean getPoliciesCacheInit(NamespaceName namespaceName) {
return policyCacheInitMap.get(namespaceName);
}
+ @Override
+ public void registerListener(TopicName topicName,
TopicPolicyListener<TopicPolicies> listener) {
+ listeners.computeIfAbsent(topicName, k ->
Lists.newCopyOnWriteArrayList()).add(listener);
+ }
+
+ @Override
+ public void unregisterListener(TopicName topicName,
TopicPolicyListener<TopicPolicies> listener) {
+ listeners.computeIfAbsent(topicName, k ->
Lists.newCopyOnWriteArrayList());
Review comment:
It should remove the specific listener, and i have updated the code,
please take a look again. Thanks
----------------------------------------------------------------
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:
[email protected]