Package org.apache.stratos.load.balancer.conf.domain

Examples of org.apache.stratos.load.balancer.conf.domain.Algorithm


                if (parameter.getNodeValue().equals("algorithmClassName")) {
                    String defaultAlgorithmName = configuration.getDefaultAlgorithmName();
                    if (StringUtils.isBlank(defaultAlgorithmName)) {
                        throw new RuntimeException("Default algorithm name not found in load balancer configuration");
                    }
                    Algorithm defaultAlgorithm = configuration.getAlgorithm(defaultAlgorithmName);
                    if (defaultAlgorithm == null) {
                        throw new RuntimeException("Default algorithm not found in load balancer configuration");
                    }
                    String algorithmClassName = defaultAlgorithm.getClassName();
                    if (log.isDebugEnabled()) {
                        log.debug(String.format("Setting algorithm-class-name = %s", algorithmClassName));
                    }
                    node.setTextContent(algorithmClassName);
                    updated = true;
View Full Code Here


            validateRequiredNode(loadBalancerNode, Constants.CONF_ELEMENT_ALGORITHMS);

            for (Node algorithmNode : algorithmsNode.getChildNodes()) {
                String className = algorithmNode.getProperty(Constants.CONF_PROPERTY_CLASS_NAME);
                validateRequiredPropertyInNode(Constants.CONF_PROPERTY_CLASS_NAME, className, "algorithm", algorithmNode.getName());
                Algorithm algorithm = new Algorithm(algorithmNode.getName(), className);
                configuration.addAlgorithm(algorithm);
            }

            if (!configuration.isTopologyEventListenerEnabled()) {
                Node servicesNode = loadBalancerNode.findChildNodeByName(Constants.CONF_ELEMENT_SERVICES);
View Full Code Here

TOP

Related Classes of org.apache.stratos.load.balancer.conf.domain.Algorithm

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.