@Test public void fastProperties() { Properties props = new Properties(); props.setProperty("iep.test.which-config", "dynamic"); PropertiesReader reader = newReader(); reader.updateDynamicConfig(props); Assert.assertEquals("dynamic", manager.get().getString("iep.test.which-config")); }
void updateDynamicConfig(Properties props) { final String overrideKey = "netflix.iep.override"; if (props.containsKey(overrideKey)) { Config override = ConfigFactory.parseString(props.getProperty(overrideKey)); props.remove(overrideKey); Config config = override.withFallback(ConfigFactory.parseProperties(props)); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } else { Config config = ConfigFactory.parseProperties(props); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } }
PropertiesReader implements Callable<PollingResponse> { void updateDynamicConfig(Properties props) { final String overrideKey = "netflix.iep.override"; if (props.containsKey(overrideKey)) { Config override = ConfigFactory.parseString(props.getProperty(overrideKey)); props.remove(overrideKey); Config config = override.withFallback(ConfigFactory.parseProperties(props)); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } else { Config config = ConfigFactory.parseProperties(props); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } } }
PropertiesReader implements Callable<PollingResponse> { void updateDynamicConfig(Properties props) { final String overrideKey = "netflix.iep.override"; if (props.containsKey(overrideKey)) { Config override = ConfigFactory.parseString(props.getProperty(overrideKey)); props.remove(overrideKey); Config config = override.withFallback(ConfigFactory.parseProperties(props)); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } else { Config config = ConfigFactory.parseProperties(props); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } } PropertiesReader(Registry registry, URL url); }
PropertiesReader implements Callable<PollingResponse> { void updateDynamicConfig(Properties props) { final String overrideKey = "netflix.iep.override"; if (props.containsKey(overrideKey)) { Config override = ConfigFactory.parseString(props.getProperty(overrideKey)); props.remove(overrideKey); Config config = override.withFallback(ConfigFactory.parseProperties(props)); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } else { Config config = ConfigFactory.parseProperties(props); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } } PropertiesReader(Registry registry, URL url); @Override PollingResponse call(); }
PropertiesReader implements Callable<PollingResponse> { void updateDynamicConfig(Properties props) { final String overrideKey = "netflix.iep.override"; if (props.containsKey(overrideKey)) { Config override = ConfigFactory.parseString(props.getProperty(overrideKey)); props.remove(overrideKey); Config config = override.withFallback(ConfigFactory.parseProperties(props)); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } else { Config config = ConfigFactory.parseProperties(props); ConfigManager.dynamicConfigManager().setOverrideConfig(config); } } PropertiesReader(Registry registry, URL url); @Override PollingResponse call();  }