@Override public Config call() { return InMemoryValueInspector.this.valueFallback.getResolvedConfig(configKey, runtimeConfig); } });
Map<ConfigKeyPath, Config> configsFromFallBack = this.valueFallback.getResolvedConfigs(configKeysNotInCache); this.recursiveConfigCache.putAll(configsFromFallBack); result.putAll(configsFromFallBack);
@Override public Config call() { return InMemoryValueInspector.this.valueFallback.getOwnConfig(configKey); } });
private void testValuesForEspressoTag(ConfigStoreValueInspector valueInspector){ Config config = valueInspector.getOwnConfig(this.espressoTag); testValuesForEspressoTagOwnConfig(config); config = valueInspector.getResolvedConfig(this.espressoTag); testValuesForEspressoTagResolvedConfig(config); }
/** * {@inheritDoc}. * * <p> * If present in the cache, return the cached {@link com.typesafe.config.Config} for given input * Otherwise, simply delegate the functionality to the internal {ConfigStoreValueInspector} and store the value into cache * </p> */ @Override public Map<ConfigKeyPath, Config> getOwnConfigs(Collection<ConfigKeyPath> configKeys) { Collection<ConfigKeyPath> configKeysNotInCache = new ArrayList<>(); Map<ConfigKeyPath, Config> result = new HashMap<>(); for(ConfigKeyPath configKey: configKeys){ Config cachedValue = this.ownConfigCache.getIfPresent(configKey); if(cachedValue==null){ configKeysNotInCache.add(configKey); } else{ result.put(configKey, cachedValue); } } // for ConfigKeyPath which are not in cache if(configKeysNotInCache.size()>0){ Map<ConfigKeyPath, Config> configsFromFallBack = this.valueFallback.getOwnConfigs(configKeysNotInCache); this.ownConfigCache.putAll(configsFromFallBack); result.putAll(configsFromFallBack); } return result; }
private void testValuesForIdentity(ConfigStoreValueInspector valueInspector){ Config ownConfig = valueInspector.getOwnConfig(identity); checkValuesForIdentityOwnConfig(ownConfig); Config resolvedConfig = valueInspector.getResolvedConfig(identity); checkValuesForIdentityResolvedConfig(resolvedConfig); }
/** * {@inheritDoc}. * * <p> * If present in the cache, return the cached {@link com.typesafe.config.Config} for given input * Otherwise, simply delegate the functionality to the internal {ConfigStoreValueInspector} and store the value into cache * </p> */ @Override public Map<ConfigKeyPath, Config> getOwnConfigs(Collection<ConfigKeyPath> configKeys) { Collection<ConfigKeyPath> configKeysNotInCache = new ArrayList<>(); Map<ConfigKeyPath, Config> result = new HashMap<>(); for(ConfigKeyPath configKey: configKeys){ Config cachedValue = this.ownConfigCache.getIfPresent(configKey); if(cachedValue==null){ configKeysNotInCache.add(configKey); } else{ result.put(configKey, cachedValue); } } // for ConfigKeyPath which are not in cache if(configKeysNotInCache.size()>0){ Map<ConfigKeyPath, Config> configsFromFallBack = this.valueFallback.getOwnConfigs(configKeysNotInCache); this.ownConfigCache.putAll(configsFromFallBack); result.putAll(configsFromFallBack); } return result; }
public Config getConfig(URI configKeyUri, Optional<Config> runtimeConfig) throws ConfigStoreFactoryDoesNotExistsException, ConfigStoreCreationException, VersionDoesNotExistException { ConfigStoreAccessor accessor = this.getConfigStoreAccessor(configKeyUri); ConfigKeyPath configKeypath = ConfigClientUtils.buildConfigKeyPath(configKeyUri, accessor.configStore); return accessor.valueInspector.getResolvedConfig(configKeypath, runtimeConfig); }
Map<ConfigKeyPath, Config> batchResult = entry.getKey().valueInspector.getResolvedConfigs(entry.getValue());
@Override public Config call() { return InMemoryValueInspector.this.valueFallback.getOwnConfig(configKey); } });
@Override public Config call() { return InMemoryValueInspector.this.valueFallback.getResolvedConfig(configKey, runtimeConfig); } });
Map<ConfigKeyPath, Config> configsFromFallBack = this.valueFallback.getResolvedConfigs(configKeysNotInCache); this.recursiveConfigCache.putAll(configsFromFallBack); result.putAll(configsFromFallBack);
public Config getConfig(URI configKeyUri, Optional<Config> runtimeConfig) throws ConfigStoreFactoryDoesNotExistsException, ConfigStoreCreationException, VersionDoesNotExistException { ConfigStoreAccessor accessor = this.getConfigStoreAccessor(configKeyUri); ConfigKeyPath configKeypath = ConfigClientUtils.buildConfigKeyPath(configKeyUri, accessor.configStore); return accessor.valueInspector.getResolvedConfig(configKeypath, runtimeConfig); }
Map<ConfigKeyPath, Config> batchResult = entry.getKey().valueInspector.getResolvedConfigs(entry.getValue());