Examples of LoadBalancer


Examples of com.cloud.network.rules.LoadBalancer

            }

            Network network = _networkModel.getNetwork(networkId);
            IPAddressVO ipAddr = _ipAddressDao.findById(ipId);
           
            LoadBalancer result = null;
            try {
                lb.setSourceIpAddressId(ipId);
               
                result = _lbMgr.createPublicLoadBalancer(lb.getXid(), lb.getName(), lb.getDescription(),
                        lb.getSourcePortStart(), lb.getDefaultPortStart(), ipId.longValue(), lb.getProtocol(),
                        lb.getAlgorithm(), false, UserContext.current());
            } catch (NetworkRuleConflictException e) {
                s_logger.warn("Failed to create LB rule, not continuing with ELB deployment");
                if (newIp) {
                    releaseIp(ipId, UserContext.current().getCallerUserId(), account);
                }
                throw e;
            }

            DomainRouterVO elbVm = null;

            if (existingLbs == null) {
                elbVm = findELBVmWithCapacity(network, ipAddr);
                if (elbVm == null) {
                    elbVm = deployLoadBalancerVM(networkId, ipAddr, account.getId());
                    if (elbVm == null) {
                        s_logger.warn("Failed to deploy a new ELB vm for ip " + ipAddr + " in network " + network + "lb name=" + lb.getName());
                        if (newIp)
                            releaseIp(ipId, UserContext.current().getCallerUserId(), account);
                    }
                }

            } else {
                ElasticLbVmMapVO elbVmMap = _elbVmMapDao.findOneByIp(ipId);
                if (elbVmMap != null) {
                    elbVm = _routerDao.findById(elbVmMap.getElbVmId());
                }
            }
           
            if (elbVm == null) {
                s_logger.warn("No ELB VM can be found or deployed");
                s_logger.warn("Deleting LB since we failed to deploy ELB VM");
                _lbDao.remove(result.getId());
                return null;
            }
           
            ElasticLbVmMapVO mapping = new ElasticLbVmMapVO(ipId, elbVm.getId(), result.getId());
            _elbVmMapDao.persist(mapping);
            return result;
           
        } finally {
            if (account != null) {
View Full Code Here

Examples of com.cloud.network.rules.LoadBalancer

        // FIXME: breaking the dependency on ELB manager. This breaks
        // functionality of ELB using virtual router
        // Bug CS-15411 opened to document this
        // LoadBalancer result = _elbMgr.handleCreateLoadBalancerRule(lb,
        // lbOwner, lb.getNetworkId());
        LoadBalancer result = null;
        if (result == null) {
            IpAddress systemIp = null;
            NetworkOffering off = _configMgr.getNetworkOffering(network.getNetworkOfferingId());
            if (off.getElasticLb() && ipVO == null && network.getVpcId() == null) {
                systemIp = _networkMgr.assignSystemIp(networkId, lbOwner, true, false);
View Full Code Here

Examples of com.cloud.network.rules.LoadBalancer

        return "autoscalevmgroup";
    }

    @Override
    public long getEntityOwnerId() {
        LoadBalancer lb = _entityMgr.findById(LoadBalancer.class, getLbRuleId());
        if (lb == null) {
            throw new InvalidParameterValueException("Unable to find loadbalancer by lbRuleId");
        }
        return lb.getAccountId();
    }
View Full Code Here

Examples of com.hazelcast.client.LoadBalancer

        final ProxyFactoryConfig proxyFactoryConfig = proxyFactoryConfigs.get(0);
        assertNotNull(proxyFactoryConfig);
        assertEquals("com.hazelcast.spring.DummyProxyFactory", proxyFactoryConfig.getClassName());
        assertEquals("MyService", proxyFactoryConfig.getService());

        final LoadBalancer loadBalancer = config3.getLoadBalancer();
        assertNotNull(loadBalancer);

        assertTrue(loadBalancer instanceof RoundRobinLB);

        final NearCacheConfig nearCacheConfig = config3.getNearCacheConfig("default");
View Full Code Here

Examples of com.microsoft.windowsazure.management.compute.models.LoadBalancer

               
                Element loadBalancersSequenceElement = XmlUtility.getElementByTagNameNS(deploymentElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancers");
                if (loadBalancersSequenceElement != null) {
                    for (int i29 = 0; i29 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(loadBalancersSequenceElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancer").size(); i29 = i29 + 1) {
                        org.w3c.dom.Element loadBalancersElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(loadBalancersSequenceElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancer").get(i29));
                        LoadBalancer loadBalancerInstance = new LoadBalancer();
                        result.getLoadBalancers().add(loadBalancerInstance);
                       
                        Element nameElement11 = XmlUtility.getElementByTagNameNS(loadBalancersElement, "http://schemas.microsoft.com/windowsazure", "Name");
                        if (nameElement11 != null) {
                            String nameInstance11;
                            nameInstance11 = nameElement11.getTextContent();
                            loadBalancerInstance.setName(nameInstance11);
                        }
                       
                        Element frontendIpConfigurationElement = XmlUtility.getElementByTagNameNS(loadBalancersElement, "http://schemas.microsoft.com/windowsazure", "FrontendIpConfiguration");
                        if (frontendIpConfigurationElement != null) {
                            FrontendIPConfiguration frontendIpConfigurationInstance = new FrontendIPConfiguration();
                            loadBalancerInstance.setFrontendIPConfiguration(frontendIpConfigurationInstance);
                           
                            Element typeElement2 = XmlUtility.getElementByTagNameNS(frontendIpConfigurationElement, "http://schemas.microsoft.com/windowsazure", "Type");
                            if (typeElement2 != null) {
                                String typeInstance2;
                                typeInstance2 = typeElement2.getTextContent();
View Full Code Here

Examples of com.sun.appserv.management.ext.lb.LoadBalancer

        for(String key : loadBalancerConfigMap.keySet()){
            try{
                String status = GuiUtil.getMessage("loadBalancer.unknown");
                HashMap oneRow = new HashMap();
                oneRow.put("name", key);
                LoadBalancer lb = AMXUtil.getDomainRoot().getLoadBalancerMap().get(key);
                if( lb != null){
                    status = GuiUtil.getMessage(lb.isApplyChangeRequired()? "loadBalancer.needApply" : "loadBalancer.upToDate");
                }
                oneRow.put("status", status);
                oneRow.put("selected", false);
                result.add(oneRow);
            }catch (Exception ex){
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.LoadBalancer

                report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                report.setMessage(msg);
                return;
            }
        } else if (lbname != null) {
            LoadBalancer lb = domain.getLoadBalancers().getLoadBalancer(lbname);
            if (lb == null) {
                String msg = localStrings.getLocalString("LoadBalancerConfigNotDefined",
                        "Load balancer configuration [{0}] not found.", lbname);
                report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                report.setMessage(msg);
                return;
            }
            config = lb.getLbConfigName();
        }

        if((lbpolicy != null) || (lbpolicymodule != null)) {
            if (!isCluster) {
                String msg = localStrings.getLocalString("NotCluster",
View Full Code Here

Examples of com.sun.enterprise.ee.admin.lbadmin.beans.Loadbalancer

     */
    public static void exportXml(LoadbalancerReader lbRdr,OutputStream out)
                    throws IOException{

        // tranform the data using visitor pattern
        Loadbalancer _lb = new Loadbalancer();

        LoadbalancerVisitor lbVstr = new LoadbalancerVisitor(_lb);
        lbRdr.accept(lbVstr);

        try {
            String footer = _strMgr.getString("GeneratedFileFooter",
                        new Date().toString());
            // write the header
            _lb.graphManager().setDoctype(PUBLICID, SYSTEMID);
            _lb.write(out);
            out.write(footer.getBytes());
        } finally {
            if (out != null) {
                out.close();
                out = null;
View Full Code Here

Examples of io.fabric8.gateway.loadbalancer.LoadBalancer

    HttpGatewayServer httpGatewayServer;
    public HttpGatewayServer startHttpGateway() {


        if( restEndpointServer!=null ) {
            LoadBalancer loadBalancer=new RoundRobinLoadBalancer();

            ServiceDTO serviceDetails = new ServiceDTO();
            serviceDetails.setContainer("local");
            serviceDetails.setVersion("1");
View Full Code Here

Examples of org.apache.camel.processor.loadbalancer.LoadBalancer

    }

    public static LoadBalancer getLoadBalancer(RouteContext routeContext, LoadBalancerType type, String ref) {
        if (type == null) {
            notNull(ref, "ref or LoadBalancerType");
            LoadBalancer loadBalancer = routeContext.lookup(ref, LoadBalancer.class);
            if (loadBalancer instanceof LoadBalancerType) {
                type = (LoadBalancerType) loadBalancer;
            } else {
                return loadBalancer;
            }
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.