类 SentinelConfig

java.lang.Object
com.alibaba.csp.sentinel.config.SentinelConfig

public final class SentinelConfig extends Object
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
  • 字段详细资料

    • APP_TYPE_COMMON

      public static final int APP_TYPE_COMMON
      The default application type.
      从以下版本开始:
      1.6.0
      另请参阅:
    • PROJECT_NAME_PROP_KEY

      public static final String PROJECT_NAME_PROP_KEY
      另请参阅:
    • APP_NAME_PROP_KEY

      public static final String APP_NAME_PROP_KEY
      另请参阅:
    • APP_TYPE_PROP_KEY

      public static final String APP_TYPE_PROP_KEY
      另请参阅:
    • CHARSET

      public static final String CHARSET
      另请参阅:
    • SINGLE_METRIC_FILE_SIZE

      public static final String SINGLE_METRIC_FILE_SIZE
      另请参阅:
    • TOTAL_METRIC_FILE_COUNT

      public static final String TOTAL_METRIC_FILE_COUNT
      另请参阅:
    • COLD_FACTOR

      public static final String COLD_FACTOR
      另请参阅:
    • STATISTIC_MAX_RT

      public static final String STATISTIC_MAX_RT
      另请参阅:
    • SPI_CLASSLOADER

      public static final String SPI_CLASSLOADER
      另请参阅:
    • METRIC_FLUSH_INTERVAL

      public static final String METRIC_FLUSH_INTERVAL
      另请参阅:
    • DEFAULT_CHARSET

      public static final String 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

      public static String getConfig(String key)
      Get config value of the specific key.
      参数:
      key - config key
      返回:
      the config value.
    • getConfig

      public static String getConfig(String key, boolean envVariableKey)
      Get config value of the specific key.
      参数:
      key - config key
      envVariableKey - Get the value of the environment variable with the given key
      返回:
      the config value.
    • setConfig

      public static void setConfig(String key, String value)
    • removeConfig

      public static String removeConfig(String key)
    • setConfigIfAbsent

      public static void setConfigIfAbsent(String key, String value)
    • getAppName

      public static String getAppName()
    • getAppType

      public static int getAppType()
      Get application type.
      返回:
      application type, common (0) by default
      从以下版本开始:
      1.6.0
    • charset

      public static String 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