public class FlowRuleManager extends Object
One resources can have multiple rules. And these rules take effects in the following order:
| Constructor and Description |
|---|
FlowRuleManager() |
| Modifier and Type | Method and Description |
|---|---|
static List<FlowRule> |
getRules()
Get a copy of the rules.
|
static boolean |
hasConfig(String resource) |
static boolean |
isOtherOrigin(String origin,
String resourceName) |
static void |
loadRules(List<FlowRule> rules)
Load
FlowRules, former rules will be replaced. |
static void |
register2Property(SentinelProperty<List<FlowRule>> property)
Listen to the
SentinelProperty for FlowRules. |
public static void register2Property(SentinelProperty<List<FlowRule>> property)
SentinelProperty for FlowRules. The property is the source of FlowRules.
Flow rules can also be set by loadRules(List) directly.property - the property to listen.public static List<FlowRule> getRules()
public static void loadRules(List<FlowRule> rules)
FlowRules, former rules will be replaced.rules - new rules to load.public static boolean hasConfig(String resource)
Copyright © 2019 Alibaba Group. All rights reserved.