类 ActiveLimitFilter

  • 所有已实现的接口:
    BaseFilter, BaseFilter.Listener, Filter

    @Activate(group="consumer",
              value="actives")
    public class ActiveLimitFilter
    extends Object
    implements Filter, BaseFilter.Listener
    ActiveLimitFilter restrict the concurrent client invocation for a service or service's method from client side. To use active limit filter, configured url with actives and provide valid >0 integer value.
         e.g. 
          In the above example maximum 2 concurrent invocation is allowed.
          If there are more than configured (in this example 2) is trying to invoke remote method, then rest of invocation
          will wait for configured timeout(default is 0 second) before invocation gets kill by dubbo.
     
    另请参阅:
    Filter
    • 构造器详细资料

      • ActiveLimitFilter

        public ActiveLimitFilter()
    • 方法详细资料

      • onResponse

        public void onResponse​(Result appResponse,
                               Invoker<?> invoker,
                               Invocation invocation)
        从接口复制的说明: BaseFilter.Listener
        This method will only be called on successful remote rpc execution, that means, the service in on remote received the request and the result (normal or exceptional) returned successfully.
        指定者:
        onResponse 在接口中 BaseFilter.Listener
        参数:
        appResponse - , the rpc call result, it can represent both normal result and exceptional result
        invoker - , context
        invocation - , context
      • onError

        public void onError​(Throwable t,
                            Invoker<?> invoker,
                            Invocation invocation)
        从接口复制的说明: BaseFilter.Listener
        This method will be called on detection of framework exceptions, for example, TimeoutException, NetworkException Exception raised in Filters, etc.
        指定者:
        onError 在接口中 BaseFilter.Listener
        参数:
        t - , framework exception
        invoker - , context
        invocation - , context