类 SentinelConfig
java.lang.Object
com.alibaba.csp.sentinel.config.SentinelConfig
The universal local configuration center of Sentinel. The config is retrieved from command line arguments
and customized properties file by default.
- 作者:
- leyou, Eric Zhao, Lin Liang
-
字段概要
字段修饰符和类型字段说明static final Stringstatic final intThe default application type.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final longstatic final longstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
方法概要
修饰符和类型方法说明static Stringcharset()static intstatic Stringstatic intGet application type.static StringGet config value of the specific key.static StringGet config value of the specific key.static longGet the metric log flush interval in secondstatic StringremoveConfig(String key) static voidstatic voidsetConfigIfAbsent(String key, String value) static booleanWhether use context classloader via config parameterstatic longstatic intGet the max RT value that Sentinel could accept for system BBR strategy.static int
-
字段详细资料
-
APP_TYPE_COMMON
public static final int APP_TYPE_COMMONThe default application type.- 从以下版本开始:
- 1.6.0
- 另请参阅:
-
PROJECT_NAME_PROP_KEY
- 另请参阅:
-
APP_NAME_PROP_KEY
- 另请参阅:
-
APP_TYPE_PROP_KEY
- 另请参阅:
-
CHARSET
- 另请参阅:
-
SINGLE_METRIC_FILE_SIZE
- 另请参阅:
-
TOTAL_METRIC_FILE_COUNT
- 另请参阅:
-
COLD_FACTOR
- 另请参阅:
-
STATISTIC_MAX_RT
- 另请参阅:
-
SPI_CLASSLOADER
- 另请参阅:
-
METRIC_FLUSH_INTERVAL
- 另请参阅:
-
DEFAULT_CHARSET
- 另请参阅:
-
DEFAULT_SINGLE_METRIC_FILE_SIZE
public static final long DEFAULT_SINGLE_METRIC_FILE_SIZE- 另请参阅:
-
DEFAULT_TOTAL_METRIC_FILE_COUNT
public static final int DEFAULT_TOTAL_METRIC_FILE_COUNT- 另请参阅:
-
DEFAULT_COLD_FACTOR
public static final int DEFAULT_COLD_FACTOR- 另请参阅:
-
DEFAULT_STATISTIC_MAX_RT
public static final int DEFAULT_STATISTIC_MAX_RT- 另请参阅:
-
DEFAULT_METRIC_FLUSH_INTERVAL
public static final long DEFAULT_METRIC_FLUSH_INTERVAL- 另请参阅:
-
-
方法详细资料
-
getConfig
Get config value of the specific key.- 参数:
key- config key- 返回:
- the config value.
-
getConfig
Get config value of the specific key.- 参数:
key- config keyenvVariableKey- Get the value of the environment variable with the given key- 返回:
- the config value.
-
setConfig
-
removeConfig
-
setConfigIfAbsent
-
getAppName
-
getAppType
public static int getAppType()Get application type.- 返回:
- application type, common (0) by default
- 从以下版本开始:
- 1.6.0
-
charset
-
metricLogFlushIntervalSec
public static long metricLogFlushIntervalSec()Get the metric log flush interval in second- 返回:
- the metric log flush interval in second
- 从以下版本开始:
- 1.8.1
-
singleMetricFileSize
public static long singleMetricFileSize() -
totalMetricFileCount
public static int totalMetricFileCount() -
coldFactor
public static int coldFactor() -
statisticMaxRt
public static int statisticMaxRt()Get the max RT value that Sentinel could accept for system BBR strategy.
- 返回:
- the max allowed RT value
- 从以下版本开始:
- 1.4.1
-
shouldUseContextClassloader
public static boolean shouldUseContextClassloader()Whether use context classloader via config parameter- 返回:
- Whether use context classloader
-