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 2019/09/29 03:54:20 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #5288: [pulsar-broker] Close previous dispatcher when subscription type changes

merlimat commented on a change in pull request #5288: [pulsar-broker] Close previous dispatcher when subscription type changes
URL: https://github.com/apache/pulsar/pull/5288#discussion_r329336606
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherMultipleConsumers.java
 ##########
 @@ -64,6 +64,10 @@ public synchronized boolean canUnsubscribe(Consumer consumer) {
         return consumerList.size() == 1 && consumerSet.contains(consumer);
     }
 
+    public boolean isClosed() {
+        return IS_CLOSED_UPDATER.get(this) == TRUE;
 
 Review comment:
   nit: for regular get/set operations, we can just use the variable itself `return isClosed == TRUE`

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


With regards,
Apache Git Services