Package com.netflix.config

Examples of com.netflix.config.ConcurrentMapConfiguration


        new SampleApplication();
        ConcurrentCompositeConfiguration myConfiguration =
            (ConcurrentCompositeConfiguration) DynamicPropertyFactory.getInstance().getBackingConfigurationSource();
       

        ConcurrentMapConfiguration subConfig = new ConcurrentMapConfiguration();
        subConfig.setProperty("com.netflix.config.samples.SampleApp.SampleBean.name", "A Coffee Bean from Cuba");
        myConfiguration.setProperty("com.netflix.config.samples.sampleapp.prop1", "value1");

        myConfiguration.addConfiguration(subConfig);
        System.out.println("Started SampleApplication. Launch JConsole to inspect and update properties.");
        System.out.println("To see how callback work, update property com.netflix.config.samples.SampleApp.SampleBean.sensitiveBeanData from BaseConfigBean in JConsole");
View Full Code Here


    // Step 1.
    // Create a Source of Configuration
    // Here we use a simple ConcurrentMapConfiguration
    // You can use your own, or use of the pre built ones including JDBCConfigurationSource
    // which lets you load properties from any RDBMS
    AbstractConfiguration myConfiguration = new ConcurrentMapConfiguration();
    myConfiguration.setProperty("com.netflix.config.samples.sampleapp.prop1", "value1");
    myConfiguration.setProperty(
        "com.netflix.config.samples.SampleApp.SampleBean.name",
        "A Coffee Bean from Gautemala");

    // STEP 2: Optional. Dynamic Runtime property change option
    // We would like to utilize the benefits of obtaining dynamic property
View Full Code Here

        // setup system properties
        System.setProperty("test.key4", "test.value4-system");
        System.setProperty("test.key5", "test.value5-system");

        final ConcurrentMapConfiguration systemConfig = new ConcurrentMapConfiguration();
        systemConfig.loadProperties(System.getProperties());

        final DynamicWatchedConfiguration zkDynamicOverrideConfig = new DynamicWatchedConfiguration(zkConfigSource);

        mapConfig = new ConcurrentMapConfiguration();
        mapConfig.addProperty("test.key1", "test.value1-map");
        mapConfig.addProperty("test.key2", "test.value2-map");
        mapConfig.addProperty("test.key3", "test.value3-map");
        mapConfig.addProperty("test.key4", "test.value4-map");
       
View Full Code Here

            if (child instanceof CombinedConfiguration) {
                CombinedConfiguration combinedConf = (CombinedConfiguration) child;
                ConcurrentCompositeConfiguration newConf = convertToConcurrentCompositeConfiguration(combinedConf);
                root.addConfiguration(newConf, name);
            } else {
                Configuration conf = new ConcurrentMapConfiguration(child);
                root.addConfiguration((AbstractConfiguration) conf, name);
            }
        }
        return root;
    }
View Full Code Here

        // there is no next load for this properties file
        if (nextLoadKeyToUse == null) {
            return null;
        }
        // make a copy of current existing properties
        ConcurrentMapConfiguration config = new ConcurrentMapConfiguration();
       
        // need to have all the properties to interpolate next load property value
        copyProperties(ConfigurationManager.getConfigInstance(), config);
        copyProperties(propConfig, config);
        // In case this is a list of files to load, always treat the value as a list
        List<Object> list = config.getList(nextLoadKeyToUse);
        StringBuilder sb = new StringBuilder();
        for (Object value: list) {
            sb.append(value).append(",");
        }
        String nextLoad = sb.toString();
View Full Code Here

TOP

Related Classes of com.netflix.config.ConcurrentMapConfiguration

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.