类 DefaultController

java.lang.Object
com.alibaba.csp.sentinel.slots.block.flow.controller.DefaultController
所有已实现的接口:
TrafficShapingController

public class DefaultController extends Object implements TrafficShapingController
Default throttling controller (immediately reject strategy).
作者:
jialiang.linjl, Eric Zhao
  • 构造器详细资料

    • DefaultController

      public DefaultController(double count, int grade)
  • 方法详细资料

    • canPass

      public boolean canPass(Node node, int acquireCount)
      从接口复制的说明: TrafficShapingController
      Check whether given resource entry can pass with provided count.
      指定者:
      canPass 在接口中 TrafficShapingController
      参数:
      node - resource node
      acquireCount - count to acquire
      返回:
      true if the resource entry can pass; false if it should be blocked
    • canPass

      public boolean canPass(Node node, int acquireCount, boolean prioritized)
      从接口复制的说明: TrafficShapingController
      Check whether given resource entry can pass with provided count.
      指定者:
      canPass 在接口中 TrafficShapingController
      参数:
      node - resource node
      acquireCount - count to acquire
      prioritized - whether the request is prioritized
      返回:
      true if the resource entry can pass; false if it should be blocked