类 ClusterParamFlowRuleManager

java.lang.Object
com.alibaba.csp.sentinel.cluster.flow.rule.ClusterParamFlowRuleManager

public final class ClusterParamFlowRuleManager extends Object
Manager for cluster parameter flow rules.
从以下版本开始:
1.4.0
作者:
Eric Zhao
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final com.alibaba.csp.sentinel.util.function.Function<String,com.alibaba.csp.sentinel.property.SentinelProperty<List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule>>>
    The default cluster parameter flow rule property supplier that creates a new dynamic property for a specific namespace to manually do rule management.
  • 方法概要

    修饰符和类型
    方法
    说明
    static List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule>
     
    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 com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule
     
    static List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule>
    getParamRules(String namespace)
    Get all cluster parameter flow rules within a specific namespace.
    static void
    loadRules(String namespace, List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule> rules)
    Load parameter flow rules for a specific namespace.
    static void
    Listen to the SentinelProperty for cluster ParamFlowRules.
    static void
     
    static void
     
    static void
    setPropertySupplier(com.alibaba.csp.sentinel.util.function.Function<String,com.alibaba.csp.sentinel.property.SentinelProperty<List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule>>> propertySupplier)
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • DEFAULT_PROPERTY_SUPPLIER

      public static final com.alibaba.csp.sentinel.util.function.Function<String,com.alibaba.csp.sentinel.property.SentinelProperty<List<com.alibaba.csp.sentinel.slots.block.flow.param.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.
  • 方法详细资料

    • setPropertySupplier

      public static void setPropertySupplier(com.alibaba.csp.sentinel.util.function.Function<String,com.alibaba.csp.sentinel.property.SentinelProperty<List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule>>> propertySupplier)
    • getNamespace

      public static String getNamespace(long flowId)
    • register2Property

      public static void register2Property(String namespace)
      Listen to the SentinelProperty for cluster ParamFlowRules. The property is the source of cluster ParamFlowRules for a specific namespace.
      参数:
      namespace - namespace to register
    • registerPropertyIfAbsent

      public static void registerPropertyIfAbsent(String namespace)
    • removeProperty

      public static void removeProperty(String namespace)
    • getParamRuleById

      public static com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule getParamRuleById(Long id)
    • getFlowIdSet

      public static Set<Long> getFlowIdSet(String namespace)
    • getAllParamRules

      public static List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule> getAllParamRules()
    • getParamRules

      public static List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule> getParamRules(String namespace)
      Get all cluster parameter flow rules within a specific namespace.
      参数:
      namespace - a valid namespace
      返回:
      cluster parameter flow rules within the provided namespace
    • loadRules

      public static void loadRules(String namespace, List<com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule> rules)
      Load parameter flow rules for a specific namespace. The former rules of the namespace will be replaced.
      参数:
      namespace - a valid namespace
      rules - rule list
    • getConnectedCount

      public static int getConnectedCount(long flowId)
      Get connected count for associated namespace of given flowId.
      参数:
      flowId - existing rule ID
      返回:
      connected count