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/08/08 18:11:57 UTC

[GitHub] [pulsar] lhotari commented on a change in pull request #11582: [Issue 11581][broker] feat:pass the executor to RateLimiter in ResourceGroupPublishLimiter

lhotari commented on a change in pull request #11582:
URL: https://github.com/apache/pulsar/pull/11582#discussion_r684810187



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java
##########
@@ -92,6 +92,11 @@ public RateLimiter(final ScheduledExecutorService service, final long permits, f
         this(service, permits, rateTime, timeUnit, permitUpdater, false);
     }
 
+    public RateLimiter(final ScheduledExecutorService service, final long permits, final long rateTime,

Review comment:
       RateLimiter already contains a lot of different constructors. The alternative is to to use the builder generated with the Lombok Builder annotation. Example of using this is in https://github.com/apache/pulsar/blob/ded806fd52f6e2f182fa02052cbd82c2a6755098/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PrecisPublishLimiter.java#L101-L117




-- 
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: commits-unsubscribe@pulsar.apache.org

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