Examples of DynamicStringProperty


Examples of com.netflix.config.DynamicStringProperty

        this.jsonMapper = jsonMapper;
    }

    @PostConstruct
    public void init() {
        DynamicStringProperty inputFP = new DynamicStringProperty(INPUT_CONFIG_PROPERTY, initialInputConfig) {
            @Override
            protected void propertyChanged() {
                buildInput(get(), false);
            }
        };

        buildInput(inputFP.get(), true);
    }
View Full Code Here

Examples of com.netflix.config.DynamicStringProperty

        this.jsonMapper = jsonMapper;
    }

    @PostConstruct
    public void init() {
        DynamicStringProperty routingMapFP = new DynamicStringProperty(ROUTING_MAP_PROPERTY, initialRoutingMap) {
            @Override
            protected void propertyChanged() {
                buildMap(get());
            }
        };

        buildMap(routingMapFP.get());
    }
View Full Code Here

Examples of com.netflix.hystrix.strategy.properties.HystrixPropertiesChainedArchaiusProperty.DynamicStringProperty

        this.metricsHealthSnapshotIntervalInMilliseconds = getProperty(propertyPrefix, key, "metrics.healthSnapshot.intervalInMilliseconds", builder.getMetricsHealthSnapshotIntervalInMilliseconds(), default_metricsHealthSnapshotIntervalInMilliseconds);
        this.requestCacheEnabled = getProperty(propertyPrefix, key, "requestCache.enabled", builder.getRequestCacheEnabled(), default_requestCacheEnabled);
        this.requestLogEnabled = getProperty(propertyPrefix, key, "requestLog.enabled", builder.getRequestLogEnabled(), default_requestLogEnabled);

        // threadpool doesn't have a global override, only instance level makes sense
        this.executionIsolationThreadPoolKeyOverride = asProperty(new DynamicStringProperty(propertyPrefix + ".command." + key.name() + ".threadPoolKeyOverride", null));
    }
View Full Code Here

Examples of com.netflix.hystrix.strategy.properties.HystrixPropertiesChainedArchaiusProperty.DynamicStringProperty

    }

    @Test
    public void testString() throws Exception {

        DynamicStringProperty pString = new DynamicStringProperty("defaultString", "default-default");
        HystrixPropertiesChainedArchaiusProperty.StringProperty fString = new HystrixPropertiesChainedArchaiusProperty.StringProperty("overrideString", pString);

        assertTrue("default-default".equals(fString.get()));

        ConfigurationManager.getConfigInstance().setProperty("defaultString", "default");
View Full Code Here

Examples of com.netflix.hystrix.strategy.properties.HystrixPropertiesChainedArchaiusProperty.DynamicStringProperty

    }

    @Test
    public void testChainingString() throws Exception {

        DynamicStringProperty node1 = new DynamicStringProperty("node1", "v1");
        StringProperty node2 = new HystrixPropertiesChainedArchaiusProperty.StringProperty("node2", node1);

        HystrixPropertiesChainedArchaiusProperty.StringProperty node3 = new HystrixPropertiesChainedArchaiusProperty.StringProperty("node3", node2);

        assertTrue("" + node3.get(), "v1".equals(node3.get()));
View Full Code Here

Examples of com.netflix.hystrix.strategy.properties.HystrixPropertiesChainedArchaiusProperty.DynamicStringProperty

    }

    @Test
    public void testAddCallback() throws Exception {

        final DynamicStringProperty node1 = new DynamicStringProperty("n1", "n1");
        final HystrixPropertiesChainedArchaiusProperty.StringProperty node2 = new HystrixPropertiesChainedArchaiusProperty.StringProperty("n2", node1);

        final AtomicInteger callbackCount = new AtomicInteger(0);

        node2.addCallback(new Runnable() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.