public class ConfigPropertiesFile extends DefaultConfigFile implements ConfigKVFile
| Constructor and Description |
|---|
ConfigPropertiesFile(String namespace,
String fileGroup,
String fileName,
ConfigFileRepo configFileRepo,
com.tencent.polaris.api.config.configuration.ConfigFileConfig configFileConfig) |
addChangeListener, getContent, hasContent, removeChangeListenerequals, getFileGroup, getFileName, getNamespace, hashCode, toStringaddChangeListener, getContent, hasContent, removeChangeListenergetFileGroup, getFileName, getNamespacepublic ConfigPropertiesFile(String namespace, String fileGroup, String fileName, ConfigFileRepo configFileRepo, com.tencent.polaris.api.config.configuration.ConfigFileConfig configFileConfig)
public String getProperty(String key, String defaultValue)
getProperty in interface ConfigKVFilepublic Integer getIntProperty(String key, Integer defaultValue)
getIntProperty in interface ConfigKVFilepublic Long getLongProperty(String key, Long defaultValue)
getLongProperty in interface ConfigKVFilepublic Short getShortProperty(String key, Short defaultValue)
getShortProperty in interface ConfigKVFilepublic Float getFloatProperty(String key, Float defaultValue)
getFloatProperty in interface ConfigKVFilepublic Double getDoubleProperty(String key, Double defaultValue)
getDoubleProperty in interface ConfigKVFilepublic Byte getByteProperty(String key, Byte defaultValue)
getByteProperty in interface ConfigKVFilepublic Boolean getBooleanProperty(String key, Boolean defaultValue)
getBooleanProperty in interface ConfigKVFilepublic String[] getArrayProperty(String key, String delimiter, String[] defaultValue)
getArrayProperty in interface ConfigKVFilepublic <T extends Enum<T>> T getEnumProperty(String key, Class<T> enumType, T defaultValue)
getEnumProperty in interface ConfigKVFilepublic <T> T getJsonProperty(String key, Class<T> clazz, T defaultValue)
getJsonProperty in interface ConfigKVFilepublic <T> T getJsonProperty(String key, Type typeOfT, T defaultValue)
getJsonProperty in interface ConfigKVFilepublic <T> T asJson(Type typeOfT, T defaultValue)
asJson in interface ConfigFileasJson in class DefaultConfigFilepublic <T> T asJson(Class<T> objectType, T defaultValue)
asJson in interface ConfigFileasJson in class DefaultConfigFilepublic Set<String> getPropertyNames()
getPropertyNames in interface ConfigKVFilepublic void addChangeListener(ConfigKVFileChangeListener listener)
addChangeListener in interface ConfigKVFilepublic void removeChangeListener(ConfigKVFileChangeListener listener)
removeChangeListener in interface ConfigKVFilepublic void onChange(ConfigFileMetadata configFileMetadata, String newContent)
onChange in interface ConfigFileRepoChangeListeneronChange in class DefaultConfigFileCopyright © 2023. All rights reserved.