| Package | Description |
|---|---|
| com.alibaba.csp.sentinel.slots.block.flow |
| Modifier and Type | Method and Description |
|---|---|
FlowRule |
FlowException.getRule()
Get triggered rule.
|
FlowRule |
FlowRule.setClusterConfig(ClusterFlowConfig clusterConfig) |
FlowRule |
FlowRule.setClusterMode(boolean clusterMode) |
FlowRule |
FlowRule.setControlBehavior(int controlBehavior) |
FlowRule |
FlowRule.setCount(double count) |
FlowRule |
FlowRule.setGrade(int grade) |
FlowRule |
FlowRule.setMaxQueueingTimeMs(int maxQueueingTimeMs) |
FlowRule |
FlowRule.setRefResource(String refResource) |
FlowRule |
FlowRule.setStrategy(int strategy) |
FlowRule |
FlowRule.setWarmUpPeriodSec(int warmUpPeriodSec) |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
static <K> Map<K,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Function<FlowRule,K> groupFunction,
Predicate<FlowRule> filter,
boolean shouldSort)
Build the flow rule map from raw list of flow rules, grouping by provided group function.
|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Predicate<FlowRule> filter)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Predicate<FlowRule> filter,
boolean shouldSort)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
static List<FlowRule> |
FlowRuleManager.getRules()
Get a copy of the rules.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
FlowRuleChecker.canPassCheck(FlowRule rule,
Context context,
DefaultNode node,
int acquireCount) |
boolean |
FlowRuleChecker.canPassCheck(FlowRule rule,
Context context,
DefaultNode node,
int acquireCount,
boolean prioritized) |
static boolean |
FlowRuleUtil.checkClusterConcurrentField(FlowRule rule) |
int |
FlowRuleComparator.compare(FlowRule o1,
FlowRule o2) |
static boolean |
FlowRuleUtil.isValidRule(FlowRule rule)
Check whether provided flow rule is valid.
|
| Modifier and Type | Method and Description |
|---|---|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
static <K> Map<K,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Function<FlowRule,K> groupFunction,
Predicate<FlowRule> filter,
boolean shouldSort)
Build the flow rule map from raw list of flow rules, grouping by provided group function.
|
static <K> Map<K,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Function<FlowRule,K> groupFunction,
Predicate<FlowRule> filter,
boolean shouldSort)
Build the flow rule map from raw list of flow rules, grouping by provided group function.
|
static <K> Map<K,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Function<FlowRule,K> groupFunction,
Predicate<FlowRule> filter,
boolean shouldSort)
Build the flow rule map from raw list of flow rules, grouping by provided group function.
|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Predicate<FlowRule> filter)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Predicate<FlowRule> filter)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Predicate<FlowRule> filter,
boolean shouldSort)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
static Map<String,List<FlowRule>> |
FlowRuleUtil.buildFlowRuleMap(List<FlowRule> list,
Predicate<FlowRule> filter,
boolean shouldSort)
Build the flow rule map from raw list of flow rules, grouping by resource name.
|
void |
FlowRuleChecker.checkFlow(Function<String,Collection<FlowRule>> ruleProvider,
ResourceWrapper resource,
Context context,
DefaultNode node,
int count,
boolean prioritized) |
static void |
FlowRuleManager.loadRules(List<FlowRule> rules)
Load
FlowRules, former rules will be replaced. |
static void |
FlowRuleManager.register2Property(SentinelProperty<List<FlowRule>> property)
Listen to the
SentinelProperty for FlowRules. |
| Constructor and Description |
|---|
FlowException(String ruleLimitApp,
FlowRule rule) |
Copyright © 2021 Alibaba Group. All rights reserved.