类 AbstractDynamicConfiguration

    • 字段详细资料

      • THREAD_POOL_PREFIX_PARAM_NAME

        public static final String THREAD_POOL_PREFIX_PARAM_NAME
        另请参阅:
        常量字段值
      • DEFAULT_THREAD_POOL_PREFIX

        public static final String DEFAULT_THREAD_POOL_PREFIX
        另请参阅:
        常量字段值
      • THREAD_POOL_SIZE_PARAM_NAME

        public static final String THREAD_POOL_SIZE_PARAM_NAME
        另请参阅:
        常量字段值
      • THREAD_POOL_KEEP_ALIVE_TIME_PARAM_NAME

        public static final String THREAD_POOL_KEEP_ALIVE_TIME_PARAM_NAME
        The keep alive time in milliseconds for threads in ThreadPoolExecutor
        另请参阅:
        常量字段值
      • GROUP_PARAM_NAME

        public static final String GROUP_PARAM_NAME
        The parameter name of group for config-center
        从以下版本开始:
        2.7.8
        另请参阅:
        常量字段值
      • TIMEOUT_PARAM_NAME

        public static final String TIMEOUT_PARAM_NAME
        The parameter name of timeout for config-center
        从以下版本开始:
        2.7.8
        另请参阅:
        常量字段值
      • DEFAULT_THREAD_POOL_SIZE

        public static final int DEFAULT_THREAD_POOL_SIZE
        另请参阅:
        常量字段值
      • DEFAULT_THREAD_POOL_KEEP_ALIVE_TIME

        public static final long DEFAULT_THREAD_POOL_KEEP_ALIVE_TIME
        Default keep alive time in milliseconds for threads in ThreadPoolExecutor is 1 minute( 60 * 1000 ms)
    • 构造器详细资料

      • AbstractDynamicConfiguration

        public AbstractDynamicConfiguration​(URL url)
      • AbstractDynamicConfiguration

        public AbstractDynamicConfiguration​(String threadPoolPrefixName,
                                            int threadPoolSize,
                                            long keepAliveTime,
                                            String group,
                                            long timeout)
    • 方法详细资料

      • addListener

        public void addListener​(String key,
                                String group,
                                ConfigurationListener listener)
        从接口复制的说明: DynamicConfiguration
        Register a configuration listener for a specified key The listener only works for service governance purpose, so the target group would always be the value user specifies at startup or 'dubbo' by default. This method will only register listener, which means it will not trigger a notification that contains the current value.
        指定者:
        addListener 在接口中 DynamicConfiguration
        参数:
        key - the key to represent a configuration
        group - the group where the key belongs to
        listener - configuration listener
      • getConfig

        public final String getConfig​(String key,
                                      String group,
                                      long timeout)
                               throws IllegalStateException
        从接口复制的说明: DynamicConfiguration
        Get the configuration mapped to the given key and the given group. If the configuration fails to fetch after timeout exceeds, IllegalStateException will be thrown.
        指定者:
        getConfig 在接口中 DynamicConfiguration
        参数:
        key - the key to represent a configuration
        group - the group where the key belongs to
        timeout - timeout value for fetching the target config
        返回:
        target configuration mapped to the given key and the given group, IllegalStateException will be thrown if timeout exceeds.
        抛出:
        IllegalStateException
      • removeConfig

        public boolean removeConfig​(String key,
                                    String group)
        指定者:
        removeConfig 在接口中 DynamicConfiguration
        参数:
        key - the key to represent a configuration
        group - the group where the key belongs to
        返回:
        true if success, or false