public class RpcConfigs extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
RpcConfigs.RpcConfigListener<T>
配置变更会拿到通知
|
| 构造器和说明 |
|---|
RpcConfigs() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected static boolean |
changed(Object oldObj,
Object newObj)
值是否发生变化
|
static boolean |
getBooleanValue(String primaryKey)
Gets boolean value.
|
static boolean |
getBooleanValue(String primaryKey,
String secondaryKey)
Gets boolean value.
|
static <T extends Enum<T>> |
getEnumValue(String primaryKey,
Class<T> enumClazz)
Gets enum value.
|
static int |
getIntValue(String primaryKey)
Gets int value.
|
static int |
getIntValue(String primaryKey,
String secondaryKey)
Gets int value.
|
static List |
getListValue(String primaryKey)
Gets list value.
|
static <T> T |
getOrDefaultValue(String primaryKey,
T defaultValue)
Gets or default value.
|
static String |
getStringValue(String primaryKey)
Gets string value.
|
static String |
getStringValue(String primaryKey,
String secondaryKey)
Gets string value.
|
static void |
putValue(String key,
Object newValue)
Put value.
|
static void |
subscribe(String key,
RpcConfigs.RpcConfigListener listener)
订阅配置变化
|
static void |
unSubscribe(String key,
RpcConfigs.RpcConfigListener listener)
取消订阅配置变化
|
public static void putValue(String key, Object newValue)
key - the keynewValue - the new valuepublic static boolean getBooleanValue(String primaryKey)
primaryKey - the primary keypublic static boolean getBooleanValue(String primaryKey, String secondaryKey)
primaryKey - the primary keysecondaryKey - the secondary keypublic static int getIntValue(String primaryKey)
primaryKey - the primary keypublic static int getIntValue(String primaryKey, String secondaryKey)
primaryKey - the primary keysecondaryKey - the secondary keypublic static <T extends Enum<T>> T getEnumValue(String primaryKey, Class<T> enumClazz)
T - the type parameterprimaryKey - the primary keyenumClazz - the enum clazzpublic static String getStringValue(String primaryKey)
primaryKey - the primary keypublic static String getStringValue(String primaryKey, String secondaryKey)
primaryKey - the primary keysecondaryKey - the secondary keypublic static List getListValue(String primaryKey)
primaryKey - the primary keypublic static <T> T getOrDefaultValue(String primaryKey, T defaultValue)
T - the type parameterprimaryKey - the primary keydefaultValue - the default valuepublic static void subscribe(String key, RpcConfigs.RpcConfigListener listener)
key - 关键字listener - 配置监听器RpcOptionspublic static void unSubscribe(String key, RpcConfigs.RpcConfigListener listener)
key - 关键字listener - 配置监听器RpcOptionsCopyright © 2008–2018 The Ant Financial. All rights reserved.