From 87281ff776b2f50880fde1f2ac8165a4f96d8af7 Mon Sep 17 00:00:00 2001 From: Daniela Morais Date: Mon, 11 Mar 2019 21:06:46 -0300 Subject: [PATCH] Replace RpcStatus to count (#2984) --- .../java/org/apache/dubbo/rpc/filter/ActiveLimitFilter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ActiveLimitFilter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ActiveLimitFilter.java index 926fd019425..1c2f69fecb9 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ActiveLimitFilter.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ActiveLimitFilter.java @@ -47,12 +47,12 @@ public Result invoke(Invoker invoker, Invocation invocation) throws RpcExcept String methodName = invocation.getMethodName(); int max = invoker.getUrl().getMethodParameter(methodName, Constants.ACTIVES_KEY, 0); RpcStatus count = RpcStatus.getStatus(invoker.getUrl(), invocation.getMethodName()); - if (!RpcStatus.beginCount(url, methodName, max)) { + if (!count.beginCount(url, methodName, max)) { long timeout = invoker.getUrl().getMethodParameter(invocation.getMethodName(), Constants.TIMEOUT_KEY, 0); long start = System.currentTimeMillis(); long remain = timeout; synchronized (count) { - while (!RpcStatus.beginCount(url, methodName, max)) { + while (!count.beginCount(url, methodName, max)) { try { count.wait(remain); } catch (InterruptedException e) { @@ -79,7 +79,7 @@ public Result invoke(Invoker invoker, Invocation invocation) throws RpcExcept isSuccess = false; throw t; } finally { - RpcStatus.endCount(url, methodName, System.currentTimeMillis() - begin, isSuccess); + count.endCount(url, methodName, System.currentTimeMillis() - begin, isSuccess); if (max > 0) { synchronized (count) { count.notifyAll();