Package com.netflix.config

Examples of com.netflix.config.DynamicConfiguration


    @Override
    public AbstractConfiguration getConfiguration() {
        //boolean consulEnabled = Boolean.parseBoolean(env.getProperty("halfpipe.consul.properties.enabled", "false"));
        FixedDelayPollingScheduler pollingScheduler = new FixedDelayPollingScheduler();
        schedulers.add(pollingScheduler);
        DynamicConfiguration dynamicConfiguration = new DynamicConfiguration(propertiesSource, pollingScheduler);
        return dynamicConfiguration;
    }
View Full Code Here


        ds,
        "select distinct property_key, property_value from MySiteProperties",
        "property_key", "property_value");
    FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(
        0, 10, false);
    DynamicConfiguration configuration = new DynamicConfiguration(source,
        scheduler);
    DynamicPropertyFactory.initWithConfigurationSource(configuration);

    DynamicStringProperty defaultProp = DynamicPropertyFactory.getInstance().getStringProperty(
        "this.prop.does.not.exist.use.default", "default");
View Full Code Here

   @Test
   public void testPropertyChange() throws Exception {

      BlobStoreConfigurationSource source = new BlobStoreConfigurationSource(ctx);
      FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(0, 1000, false);
      DynamicConfiguration dynamicConfig = new DynamicConfiguration(source, scheduler);
      ConfigurationManager.loadPropertiesFromConfiguration(dynamicConfig);

      DynamicStringProperty test1 = DynamicPropertyFactory.getInstance().getStringProperty("test1", "");
      DynamicStringProperty test2 = DynamicPropertyFactory.getInstance().getStringProperty("test2", "");
      DynamicStringProperty test3 = DynamicPropertyFactory.getInstance().getStringProperty("test3", "");
View Full Code Here

    public void register(BreakerboxConfiguration breakerboxConfiguration) {
        if (breakerboxConfiguration.getUrls().isEmpty()) {
            return;
        }
        ConfigurationManager.install(
                new DynamicConfiguration(
                    new URLConfigurationSource(breakerboxConfiguration.getUrls().split(",")),
                    new TenacityPollingScheduler(
                            (int)breakerboxConfiguration.getInitialDelay().toMilliseconds(),
                            (int)breakerboxConfiguration.getDelay().toMilliseconds(),
                            true)));
View Full Code Here

      //Find the config file
      File turbineConfig = FileLocator.findUniqueFile("dashboard-config.properties");
      LOGGER.debug("Found dashboard config file: "+turbineConfig.getAbsolutePath());
      //Add it as a configuration source
      PolledConfigurationSource source = new URLConfigurationSource(new URL(FILE_PREFIX+turbineConfig.getAbsolutePath()));
      DynamicConfiguration configuration = new DynamicConfiguration(source, new FixedDelayPollingScheduler());
      //Add the configurations to Archiaus
      ConfigurationManager.install(configuration);
      //Init Turbine
      TurbineInit.init();
      LOGGER.debug("Successfully inited Turbine");
View Full Code Here

TOP

Related Classes of com.netflix.config.DynamicConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.