Examples of AdaptiveTimingStrategy


Examples of com.graphaware.runtime.schedule.AdaptiveTimingStrategy

            return strategy;
        }

        if (timingStrategy instanceof AdaptiveTimingStrategy) {
            AdaptiveTimingStrategy strategy = (AdaptiveTimingStrategy) timingStrategy;

            if (config.get(DELAY_SETTING) != null) {
                strategy = strategy.withDefaultDelayMillis(config.get(DELAY_SETTING));
            }

            if (config.get(MAX_DELAY_SETTING) != null) {
                strategy = strategy.withMaximumDelayMillis(config.get(MAX_DELAY_SETTING));
            }

            if (config.get(MIN_DELAY_SETTING) != null) {
                strategy = strategy.withMinimumDelayMillis(config.get(MIN_DELAY_SETTING));
            }

            if (config.get(BUSY_THRESHOLD_SETTING) != null) {
                strategy = strategy.withBusyThreshold(config.get(BUSY_THRESHOLD_SETTING));
            }

            if (config.get(MAX_SAMPLES_SETTING) != null) {
                strategy = strategy.withMaxSamples(config.get(MAX_SAMPLES_SETTING));
            }

            if (config.get(MAX_TIME_SETTING) != null) {
                strategy = strategy.withMaxTime(config.get(MAX_TIME_SETTING));
            }

            return strategy;
        }
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.