public final class ClusterServerConfigManager extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addTransportConfigChangeObserver(ServerTransportConfigObserver observer)
Add a transport config observer.
|
static double |
getExceedCount() |
static double |
getExceedCount(String namespace) |
static int |
getIdleSeconds() |
static int |
getIntervalMs() |
static int |
getIntervalMs(String namespace) |
static double |
getMaxAllowedQps() |
static double |
getMaxAllowedQps(String namespace) |
static double |
getMaxOccupyRatio() |
static double |
getMaxOccupyRatio(String namespace) |
static Set<String> |
getNamespaceSet() |
static int |
getPort() |
static int |
getSampleCount() |
static int |
getSampleCount(String namespace)
Get sample count of provided namespace.
|
static boolean |
isEmbedded() |
static boolean |
isValidFlowConfig(ServerFlowConfig config) |
static boolean |
isValidTransportConfig(ServerTransportConfig config) |
static void |
loadFlowConfig(String namespace,
ServerFlowConfig config)
Load server flow config for a specific namespace.
|
static void |
loadGlobalFlowConfig(ServerFlowConfig config)
Load provided server global statistic (flow) configuration to property in memory.
|
static void |
loadGlobalTransportConfig(ServerTransportConfig config)
Load provided server transport configuration to property in memory.
|
static void |
loadServerNamespaceSet(Set<String> namespaceSet)
Load provided server namespace set to property in memory.
|
static void |
registerGlobalServerFlowProperty(SentinelProperty<ServerFlowConfig> property)
Register cluster server global statistic (flow) configuration dynamic property.
|
static void |
registerNamespaceSetProperty(SentinelProperty<Set<String>> property)
Register cluster server namespace set dynamic property.
|
static void |
registerServerTransportProperty(SentinelProperty<ServerTransportConfig> property)
Register cluster server transport configuration dynamic property.
|
static void |
setEmbedded(boolean embedded)
Set the embedded mode flag for the token server.
|
static void |
setMaxAllowedQps(double maxAllowedQps) |
static void |
setNamespaceSet(Set<String> namespaceSet) |
public static void registerNamespaceSetProperty(SentinelProperty<Set<String>> property)
property - server namespace set dynamic propertypublic static void registerServerTransportProperty(SentinelProperty<ServerTransportConfig> property)
property - server transport configuration dynamic propertypublic static void registerGlobalServerFlowProperty(SentinelProperty<ServerFlowConfig> property)
property - server flow configuration dynamic propertypublic static void loadServerNamespaceSet(Set<String> namespaceSet)
namespaceSet - valid namespace setpublic static void loadGlobalTransportConfig(ServerTransportConfig config)
config - valid cluster server transport configurationpublic static void loadGlobalFlowConfig(ServerFlowConfig config)
config - valid cluster server flow configuration for globalpublic static void loadFlowConfig(String namespace, ServerFlowConfig config)
namespace - a valid namespaceconfig - valid flow config for the namespacepublic static void addTransportConfigChangeObserver(ServerTransportConfigObserver observer)
observer - a valid transport config observerpublic static boolean isValidTransportConfig(ServerTransportConfig config)
public static boolean isValidFlowConfig(ServerFlowConfig config)
public static double getExceedCount(String namespace)
public static double getMaxOccupyRatio(String namespace)
public static int getIntervalMs(String namespace)
public static int getSampleCount(String namespace)
namespace - valid namespacepublic static double getMaxAllowedQps()
public static double getMaxAllowedQps(String namespace)
public static double getExceedCount()
public static double getMaxOccupyRatio()
public static int getPort()
public static int getIdleSeconds()
public static int getIntervalMs()
public static int getSampleCount()
public static boolean isEmbedded()
public static void setEmbedded(boolean embedded)
Set the embedded mode flag for the token server.
NOTE: developers SHOULD NOT manually invoke this method. The embedded flag should be initialized by Sentinel when starting token server.
embedded - whether the token server is currently running in embedded modepublic static void setMaxAllowedQps(double maxAllowedQps)
Copyright © 2021 Alibaba Group. All rights reserved.