use of com.tencent.polaris.configuration.client.factory.ConfigFileFactory in project polaris-java by polarismesh.
the class DefaultConfigFileManager method getConfigKVFile.
@Override
public ConfigKVFile getConfigKVFile(ConfigFileMetadata configFileMetadata, ConfigFileFormat fileFormat) {
ConfigKVFile configFile = configPropertiesFileCache.get(configFileMetadata);
if (configFile == null) {
synchronized (this) {
configFile = configPropertiesFileCache.get(configFileMetadata);
if (configFile == null) {
ConfigFileFactory configFileFactory = configFileFactoryManager.getFactory(configFileMetadata);
configFile = configFileFactory.createConfigKVFile(configFileMetadata, fileFormat);
configPropertiesFileCache.put(configFileMetadata, configFile);
}
}
}
return configFile;
}
use of com.tencent.polaris.configuration.client.factory.ConfigFileFactory in project polaris-java by polarismesh.
the class DefaultConfigFileManager method getConfigFile.
@Override
public ConfigFile getConfigFile(ConfigFileMetadata configFileMetadata) {
ConfigFile configFile = configFileCache.get(configFileMetadata);
if (configFile == null) {
synchronized (this) {
configFile = configFileCache.get(configFileMetadata);
if (configFile == null) {
ConfigFileFactory configFileFactory = configFileFactoryManager.getFactory(configFileMetadata);
configFile = configFileFactory.createConfigFile(configFileMetadata);
configFileCache.put(configFileMetadata, configFile);
}
}
}
return configFile;
}
Aggregations