接口 TPSLimiter

  • 所有已知实现类:
    DefaultTPSLimiter

    public interface TPSLimiter
    Provide boolean information whether a invocation of a provider service's methods or a particular method is allowed within a last invocation and current invocation.
         e.g. if tps for a method m1 is 5 for a minute then if 6th call is made within the span of 1 minute then 6th
         should not be allowed isAllowable will return false.
     
    • 方法详细资料

      • isAllowable

        boolean isAllowable​(URL url,
                            Invocation invocation)
        judge if the current invocation is allowed by TPS rule
        参数:
        url - url
        invocation - invocation
        返回:
        true allow the current invocation, otherwise, return false