public final class ParamFlowRuleUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
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,
Function<ParamFlowRule,K> groupFunction,
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,
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,
Predicate<ParamFlowRule> filter,
boolean shouldSort)
Build the parameter flow rule map from raw list of rules, grouping by resource name.
|
static void |
fillExceptionFlowItems(ParamFlowRule rule)
Fill the parameter rule with parsed items.
|
static boolean |
isValidRule(ParamFlowRule rule)
Check whether the provided rule is valid.
|
static boolean |
validClusterRuleId(Long id) |
public static boolean isValidRule(ParamFlowRule rule)
rule - any parameter rulepublic static boolean validClusterRuleId(Long id)
public static void fillExceptionFlowItems(ParamFlowRule rule)
rule - valid parameter rulepublic static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list)
list - raw list of flow rulespublic static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, Predicate<ParamFlowRule> filter)
list - raw list of parameter flow rulesfilter - rule filterpublic static Map<String,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, Predicate<ParamFlowRule> filter, boolean shouldSort)
list - raw list of parameter flow rulesfilter - rule filtershouldSort - whether the rules should be sortedpublic static <K> Map<K,List<ParamFlowRule>> buildParamRuleMap(List<ParamFlowRule> list, Function<ParamFlowRule,K> groupFunction, Predicate<ParamFlowRule> filter, boolean shouldSort)
K - type of keylist - raw list of parameter flow rulesgroupFunction - grouping function of the map (by key)filter - rule filtershouldSort - whether the rules should be sortedCopyright © 2022 Alibaba Group. All rights reserved.