类 FlowRuleManager
java.lang.Object
com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager
One resources can have multiple rules. And these rules take effects in the following order:
- requests from specified caller
- no specified caller
- 作者:
- jialiang.linjl, Eric Zhao, Weihua
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getRules()Get a copy of the rules.static booleanstatic booleanisOtherOrigin(String origin, String resourceName) static voidLoadFlowRules, former rules will be replaced.static voidregister2Property(SentinelProperty<List<FlowRule>> property) Listen to theSentinelPropertyforFlowRules.
-
构造器详细资料
-
FlowRuleManager
public FlowRuleManager()
-
-
方法详细资料
-
register2Property
Listen to theSentinelPropertyforFlowRules. The property is the source ofFlowRules. Flow rules can also be set byloadRules(List)directly.- 参数:
property- the property to listen.
-
getRules
Get a copy of the rules.- 返回:
- a new copy of the rules.
-
loadRules
LoadFlowRules, former rules will be replaced.- 参数:
rules- new rules to load.
-
hasConfig
-
isOtherOrigin
-