public final class ClusterParamFlowRuleManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static Function<String,SentinelProperty<List<ParamFlowRule>>> |
DEFAULT_PROPERTY_SUPPLIER
The default cluster parameter flow rule property supplier that creates a new
dynamic property for a specific namespace to manually do rule management.
|
| Modifier and Type | Method and Description |
|---|---|
static List<ParamFlowRule> |
getAllParamRules() |
static int |
getConnectedCount(long flowId)
Get connected count for associated namespace of given
flowId. |
static Set<Long> |
getFlowIdSet(String namespace) |
static String |
getNamespace(long flowId) |
static ParamFlowRule |
getParamRuleById(Long id) |
static List<ParamFlowRule> |
getParamRules(String namespace)
Get all cluster parameter flow rules within a specific namespace.
|
static void |
loadRules(String namespace,
List<ParamFlowRule> rules)
Load parameter flow rules for a specific namespace.
|
static void |
register2Property(String namespace)
Listen to the
SentinelProperty for cluster ParamFlowRules. |
static void |
registerPropertyIfAbsent(String namespace) |
static void |
removeProperty(String namespace) |
static void |
setPropertySupplier(Function<String,SentinelProperty<List<ParamFlowRule>>> propertySupplier) |
public static final Function<String,SentinelProperty<List<ParamFlowRule>>> DEFAULT_PROPERTY_SUPPLIER
public static void setPropertySupplier(Function<String,SentinelProperty<List<ParamFlowRule>>> propertySupplier)
public static String getNamespace(long flowId)
public static void register2Property(String namespace)
SentinelProperty for cluster ParamFlowRules.
The property is the source of cluster ParamFlowRules for a specific namespace.namespace - namespace to registerpublic static void registerPropertyIfAbsent(String namespace)
public static void removeProperty(String namespace)
public static ParamFlowRule getParamRuleById(Long id)
public static List<ParamFlowRule> getAllParamRules()
public static List<ParamFlowRule> getParamRules(String namespace)
namespace - a valid namespacepublic static void loadRules(String namespace, List<ParamFlowRule> rules)
namespace - a valid namespacerules - rule listpublic static int getConnectedCount(long flowId)
flowId.flowId - existing rule IDCopyright © 2021 Alibaba Group. All rights reserved.