类 ConfigPropertiesFile
java.lang.Object
com.tencent.polaris.configuration.client.internal.DefaultConfigFileMetadata
com.tencent.polaris.configuration.client.internal.DefaultConfigFile
com.tencent.polaris.configuration.client.internal.ConfigPropertiesFile
- 直接已知子类:
ConfigYamlFile
public class ConfigPropertiesFile extends DefaultConfigFile implements ConfigKVFile
The properties file.
- 作者:
- lepdou 2022-03-04
-
构造器概要
构造器 构造器 说明 ConfigPropertiesFile(java.lang.String namespace, java.lang.String fileGroup, java.lang.String fileName, ConfigFileRepo configFileRepo, com.tencent.polaris.api.config.configuration.ConfigFileConfig configFileConfig) -
方法概要
修饰符和类型 方法 说明 voidaddChangeListener(ConfigKVFileChangeListener listener)<T> TasJson(java.lang.Class<T> objectType, T defaultValue)<T> TasJson(java.lang.reflect.Type typeOfT, T defaultValue)java.lang.String[]getArrayProperty(java.lang.String key, java.lang.String delimiter, java.lang.String[] defaultValue)java.lang.BooleangetBooleanProperty(java.lang.String key, java.lang.Boolean defaultValue)java.lang.BytegetByteProperty(java.lang.String key, java.lang.Byte defaultValue)java.lang.DoublegetDoubleProperty(java.lang.String key, java.lang.Double defaultValue)<T extends java.lang.Enum<T>>
TgetEnumProperty(java.lang.String key, java.lang.Class<T> enumType, T defaultValue)java.lang.FloatgetFloatProperty(java.lang.String key, java.lang.Float defaultValue)java.lang.IntegergetIntProperty(java.lang.String key, java.lang.Integer defaultValue)<T> TgetJsonProperty(java.lang.String key, java.lang.Class<T> clazz, T defaultValue)<T> TgetJsonProperty(java.lang.String key, java.lang.reflect.Type typeOfT, T defaultValue)java.lang.LonggetLongProperty(java.lang.String key, java.lang.Long defaultValue)java.lang.StringgetProperty(java.lang.String key, java.lang.String defaultValue)java.util.Set<java.lang.String>getPropertyNames()java.lang.ShortgetShortProperty(java.lang.String key, java.lang.Short defaultValue)voidonChange(ConfigFileMetadata configFileMetadata, java.lang.String newContent)voidremoveChangeListener(ConfigKVFileChangeListener listener)从类继承的方法 com.tencent.polaris.configuration.client.internal.DefaultConfigFile
addChangeListener, getContent, hasContent, removeChangeListener从类继承的方法 com.tencent.polaris.configuration.client.internal.DefaultConfigFileMetadata
equals, getFileGroup, getFileName, getNamespace, hashCode, toString从类继承的方法 java.lang.Object
getClass, notify, notifyAll, wait, wait, wait从接口继承的方法 com.tencent.polaris.configuration.api.core.ConfigFile
addChangeListener, getContent, hasContent, removeChangeListener从接口继承的方法 com.tencent.polaris.configuration.api.core.ConfigFileMetadata
getFileGroup, getFileName, getNamespace
-
构造器详细资料
-
ConfigPropertiesFile
public ConfigPropertiesFile(java.lang.String namespace, java.lang.String fileGroup, java.lang.String fileName, ConfigFileRepo configFileRepo, com.tencent.polaris.api.config.configuration.ConfigFileConfig configFileConfig)
-
-
方法详细资料
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)- 指定者:
getProperty在接口中ConfigKVFile
-
getIntProperty
public java.lang.Integer getIntProperty(java.lang.String key, java.lang.Integer defaultValue)- 指定者:
getIntProperty在接口中ConfigKVFile
-
getLongProperty
public java.lang.Long getLongProperty(java.lang.String key, java.lang.Long defaultValue)- 指定者:
getLongProperty在接口中ConfigKVFile
-
getShortProperty
public java.lang.Short getShortProperty(java.lang.String key, java.lang.Short defaultValue)- 指定者:
getShortProperty在接口中ConfigKVFile
-
getFloatProperty
public java.lang.Float getFloatProperty(java.lang.String key, java.lang.Float defaultValue)- 指定者:
getFloatProperty在接口中ConfigKVFile
-
getDoubleProperty
public java.lang.Double getDoubleProperty(java.lang.String key, java.lang.Double defaultValue)- 指定者:
getDoubleProperty在接口中ConfigKVFile
-
getByteProperty
public java.lang.Byte getByteProperty(java.lang.String key, java.lang.Byte defaultValue)- 指定者:
getByteProperty在接口中ConfigKVFile
-
getBooleanProperty
public java.lang.Boolean getBooleanProperty(java.lang.String key, java.lang.Boolean defaultValue)- 指定者:
getBooleanProperty在接口中ConfigKVFile
-
getArrayProperty
public java.lang.String[] getArrayProperty(java.lang.String key, java.lang.String delimiter, java.lang.String[] defaultValue)- 指定者:
getArrayProperty在接口中ConfigKVFile
-
getEnumProperty
public <T extends java.lang.Enum<T>> T getEnumProperty(java.lang.String key, java.lang.Class<T> enumType, T defaultValue)- 指定者:
getEnumProperty在接口中ConfigKVFile
-
getJsonProperty
public <T> T getJsonProperty(java.lang.String key, java.lang.Class<T> clazz, T defaultValue)- 指定者:
getJsonProperty在接口中ConfigKVFile
-
getJsonProperty
public <T> T getJsonProperty(java.lang.String key, java.lang.reflect.Type typeOfT, T defaultValue)- 指定者:
getJsonProperty在接口中ConfigKVFile
-
asJson
public <T> T asJson(java.lang.reflect.Type typeOfT, T defaultValue)- 指定者:
asJson在接口中ConfigFile- 覆盖:
asJson在类中DefaultConfigFile
-
asJson
public <T> T asJson(java.lang.Class<T> objectType, T defaultValue)- 指定者:
asJson在接口中ConfigFile- 覆盖:
asJson在类中DefaultConfigFile
-
getPropertyNames
public java.util.Set<java.lang.String> getPropertyNames()- 指定者:
getPropertyNames在接口中ConfigKVFile
-
addChangeListener
- 指定者:
addChangeListener在接口中ConfigKVFile
-
removeChangeListener
- 指定者:
removeChangeListener在接口中ConfigKVFile
-
onChange
- 指定者:
onChange在接口中ConfigFileRepoChangeListener- 覆盖:
onChange在类中DefaultConfigFile
-