You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/11/01 14:57:34 UTC

[GitHub] [dubbo] justxuewei commented on a change in pull request #8967: Dubbo3.0 :adaptive service

justxuewei commented on a change in pull request #8967:
URL: https://github.com/apache/dubbo/pull/8967#discussion_r740278545



##########
File path: dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/limiter/AbstractLimiter.java
##########
@@ -0,0 +1,51 @@
+package org.apache.dubbo.rpc.filter.limiter;
+
+import org.apache.dubbo.rpc.filter.limit.Limit;
+import org.apache.dubbo.rpc.filter.limit.VegasLimit;
+
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Supplier;
+
+public abstract class AbstractLimiter implements Limiter{
+    private static final Supplier<Long> clock = System::nanoTime;
+    protected Limit limitAlgorithm;
+    protected AtomicInteger inflight;
+
+    public AbstractLimiter(){
+        this.limitAlgorithm = new VegasLimit();

Review comment:
       Why use VegasLimit as default limit algorithm for the AbstractLimiter?




-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org