类 ParamFlowRuleUtil
java.lang.Object
com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRuleUtil
- 作者:
- Eric Zhao
-
方法概要
修饰符和类型方法说明static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list) Build the flow rule map from raw list of flow rules, grouping by resource name.static <K> Map<K,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, com.alibaba.csp.sentinel.util.function.Function<ParamFlowRule, K> groupFunction, com.alibaba.csp.sentinel.util.function.Predicate<ParamFlowRule> filter, boolean shouldSort) Build the rule map from raw list of parameter flow rules, grouping by provided group function.static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, com.alibaba.csp.sentinel.util.function.Predicate<ParamFlowRule> filter) Build the parameter flow rule map from raw list of rules, grouping by resource name.static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, com.alibaba.csp.sentinel.util.function.Predicate<ParamFlowRule> filter, boolean shouldSort) Build the parameter flow rule map from raw list of rules, grouping by resource name.static voidFill the parameter rule with parsed items.static booleanisValidRule(ParamFlowRule rule) Check whether the provided rule is valid.static boolean
-
方法详细资料
-
isValidRule
Check whether the provided rule is valid.- 参数:
rule- any parameter rule- 返回:
- true if valid, otherwise false
-
validClusterRuleId
-
fillExceptionFlowItems
Fill the parameter rule with parsed items.- 参数:
rule- valid parameter rule
-
buildParamRuleMap
Build the flow rule map from raw list of flow rules, grouping by resource name.- 参数:
list- raw list of flow rules- 返回:
- constructed new flow rule map; empty map if list is null or empty, or no valid rules
- 从以下版本开始:
- 1.6.1
-
buildParamRuleMap
public static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, com.alibaba.csp.sentinel.util.function.Predicate<ParamFlowRule> filter) Build the parameter flow rule map from raw list of rules, grouping by resource name.- 参数:
list- raw list of parameter flow rulesfilter- rule filter- 返回:
- constructed new parameter flow rule map; empty map if list is null or empty, or no wanted rules
- 从以下版本开始:
- 1.6.1
-
buildParamRuleMap
public static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, com.alibaba.csp.sentinel.util.function.Predicate<ParamFlowRule> filter, boolean shouldSort) Build the parameter flow rule map from raw list of rules, grouping by resource name.- 参数:
list- raw list of parameter flow rulesfilter- rule filtershouldSort- whether the rules should be sorted- 返回:
- constructed new parameter flow rule map; empty map if list is null or empty, or no wanted rules
- 从以下版本开始:
- 1.6.1
-
buildParamRuleMap
public static <K> Map<K,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, com.alibaba.csp.sentinel.util.function.Function<ParamFlowRule, K> groupFunction, com.alibaba.csp.sentinel.util.function.Predicate<ParamFlowRule> filter, boolean shouldSort) Build the rule map from raw list of parameter flow rules, grouping by provided group function.- 类型参数:
K- type of key- 参数:
list- raw list of parameter flow rulesgroupFunction- grouping function of the map (by key)filter- rule filtershouldSort- whether the rules should be sorted- 返回:
- constructed new rule map; empty map if list is null or empty, or no wanted rules
- 从以下版本开始:
- 1.6.1
-