Package com.netflix.config

Examples of com.netflix.config.ExpandedConfigurationListenerAdapter


     */
    @Test
    public void testUpdateProperties() throws InterruptedException {
        AbstractConfiguration.setDefaultListDelimiter(',');
        AbstractConfiguration config  = new ConcurrentCompositeConfiguration();
        config.addConfigurationListener(new ExpandedConfigurationListenerAdapter(new MyListener()));
        MyListener.resetCount();
        config.setProperty("test", "host,host1,host2");
        config.setProperty("test12", "host12");
        Map<String,Object> added = Maps.newHashMap();
        added.put("test.host","test,test1");
View Full Code Here


 
    @Test
    public void testAddorChangeProperty(){
        AbstractConfiguration.setDefaultListDelimiter(',');
        AbstractConfiguration config  = new ConcurrentCompositeConfiguration();
        config.addConfigurationListener(new ExpandedConfigurationListenerAdapter(new MyListener()));
        MyListener.resetCount();
        config.setProperty("test.host", "test,test1,test2");
        assertEquals(1, MyListener.count);
        dynamicPropertyUpdater.addOrChangeProperty("test.host", "test,test1,test2", config);
        assertEquals(3,((CopyOnWriteArrayList)(config.getProperty("test.host"))).size());
View Full Code Here

   
    @Test
    public void testAddorUpdatePropertyWithColonDelimiter(){
        AbstractConfiguration.setDefaultListDelimiter(':');
        AbstractConfiguration config  = new ConcurrentCompositeConfiguration();
        config.addConfigurationListener(new ExpandedConfigurationListenerAdapter(new MyListener()));
        MyListener.resetCount();
        config.setProperty("test.host", "test:test1:test2");
        assertEquals(1, MyListener.count);
        dynamicPropertyUpdater.addOrChangeProperty("test.host", "test:test1:test2", config);
        assertEquals(3,((CopyOnWriteArrayList)(config.getProperty("test.host"))).size());
View Full Code Here

        PropertyConfigurator.configure(this.props);
        closeNonexistingAsyncAppenders();
        this.logger = org.slf4j.LoggerFactory
        .getLogger(LoggingConfiguration.class);
        ConfigurationManager.getConfigInstance().addConfigurationListener(
                new ExpandedConfigurationListenerAdapter(this));
    }
View Full Code Here

TOP

Related Classes of com.netflix.config.ExpandedConfigurationListenerAdapter

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.