Package com.graphaware.runtime.schedule

Examples of com.graphaware.runtime.schedule.TimingStrategy


    public Neo4jConfigBasedRuntimeConfiguration(Config config) {
        super(createTimingStrategy(config), createWritingConfig(config));
    }

    private static TimingStrategy createTimingStrategy(Config config) {
        TimingStrategy timingStrategy = config.get(TIMING_STRATEGY_SETTING);

        if (timingStrategy == null) {
            return AdaptiveTimingStrategy.defaultConfiguration();
        }
View Full Code Here


        parameterMap.put("com.graphaware.runtime.timing.busyThreshold", "94");
        parameterMap.put("com.graphaware.runtime.timing.maxSamples", "201");
        parameterMap.put("com.graphaware.runtime.timing.maxTime", "2001");
        Config config = new Config(parameterMap);

        TimingStrategy expected = AdaptiveTimingStrategy
                .defaultConfiguration()
                .withBusyThreshold(94)
                .withDefaultDelayMillis(50)
                .withMinimumDelayMillis(10)
                .withMaximumDelayMillis(100)
View Full Code Here

        parameterMap.put("com.graphaware.runtime.timing.strategy", "fixed");
        parameterMap.put("com.graphaware.runtime.timing.initialDelay", "100");
        parameterMap.put("com.graphaware.runtime.timing.delay", "50");
        Config config = new Config(parameterMap);

        TimingStrategy expected = FixedDelayTimingStrategy
                .getInstance()
                .withDelay(50)
                .withInitialDelay(100);

        assertEquals(expected, new Neo4jConfigBasedRuntimeConfiguration(config).getTimingStrategy());
View Full Code Here

    @Test
    public void shouldFallBackToValueDefaultConfigurationIfValueIsNotFoundInConfig() {
        Map<String, String> parameterMap = new HashMap<>();
        Config config = new Config(parameterMap);

        TimingStrategy expected = AdaptiveTimingStrategy
                .defaultConfiguration();

        assertEquals(expected, new Neo4jConfigBasedRuntimeConfiguration(config).getTimingStrategy());
    }
View Full Code Here

TOP

Related Classes of com.graphaware.runtime.schedule.TimingStrategy

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.