Package org.apache.stratos.cloud.controller.stub.pojo

Examples of org.apache.stratos.cloud.controller.stub.pojo.Properties


        this.partitionAlgo = value;
    }
   
    public void setPartitions(Partition[] partitions) {
        this.partitions = partitions;
        partitions[0].setProperties(new Properties());
    }
View Full Code Here


                return null;
            }        
             
            partition = new Partition();              
            partition.setId(partitionId);
            Properties properties = AutoscalerUtil.getProperties(partitionElt);
            if (properties != null) {
                partition.setProperties(properties);
            }
            String providerValue = readValue(partitionElt, "provider");
            if (providerValue != null) {
View Full Code Here

                                    String providerValue = readValue(partitionElt, "provider");
                                    if (providerValue != null) {
                                        partition.setProvider(providerValue);
                                    }
                                   
                                    Properties properties = AutoscalerUtil.getProperties(partitionElt);
                                    if (properties != null) {
                                        partition.setProperties(properties);
                                    }
                                    partitions.add(partition);
                                } else {
View Full Code Here

        if(propertyList.isEmpty()) {
            return null;
        }

        Property[] propertyArray = propertyList.toArray(new Property[propertyList.size()]);
        Properties properties = new Properties();
        properties.setProperties(propertyArray);
        return properties;
    }
View Full Code Here

          log.error(msg);
          throw new ADCException(msg);
        }
       
        // check if this subscription requires Persistence Mapping, and its supported by the cartridge definition
        Properties persistenceMappingProperties = null;
        if (subscriptionData.getPersistanceContext() != null) {
            persistenceMappingProperties = getPersistenceMappingProperties(subscriptionData.getPersistanceContext(), cartridgeInfo);
        }

        Properties serviceCartridgeSubscriptionProperties = null;
        LBDataContext lbDataCtxt = null;
        CartridgeSubscription lbCartridgeSubscription = null;
        Properties lbCartridgeSubscriptionProperties = null;
        String lbClusterId = null;

        // get lb config reference
        LoadbalancerConfig lbConfig = cartridgeInfo.getLbConfig();
        if (lbConfig == null || lbConfig.getProperties() == null) {
            // no LB ref
            if (log.isDebugEnabled()) {
                log.debug("This Service does not require a load balancer. " + "[Service Name] " +
                        subscriptionData.getCartridgeType());
            }

        } else {

            // LB ref found, get relevant LB Context data
            lbDataCtxt = CartridgeSubscriptionUtils.getLoadBalancerDataContext(subscriptionData.getTenantId(), subscriptionData.getCartridgeType(),
                    subscriptionData.getDeploymentPolicyName(), lbConfig);

            // subscribe to LB
            lbCartridgeSubscription = subscribeToLB (subscriptionData, lbDataCtxt, cartridgeInfo);

            // determine the LB cluster id, if available
            if (lbCartridgeSubscription != null) {
                lbClusterId = lbCartridgeSubscription.getClusterDomain();
            }

            lbCartridgeSubscriptionProperties =  new Properties();
            if (lbDataCtxt.getLbProperperties() != null && !lbDataCtxt.getLbProperperties().isEmpty()) {
                lbCartridgeSubscriptionProperties.setProperties(lbDataCtxt.getLbProperperties().toArray(new Property[0]));
            }
        }

        // subscribe to relevant service cartridge
        CartridgeSubscription serviceCartridgeSubscription = subscribe (subscriptionData, cartridgeInfo, lbClusterId);
        serviceCartridgeSubscriptionProperties = new Properties();

        // lb related properties
        if ((lbDataCtxt != null && lbDataCtxt.getLoadBalancedServiceProperties() != null) && !lbDataCtxt.getLoadBalancedServiceProperties().isEmpty()) {
            serviceCartridgeSubscriptionProperties.setProperties(lbDataCtxt.getLoadBalancedServiceProperties().toArray(new Property[0]));
        }
View Full Code Here

            String errorMsg = "Persistence Mapping not supported by the cartridge type " + cartridgeInfo.getType();
            log.error(errorMsg);
            throw new ADCException(errorMsg);
        }

        Properties persistenceMappingProperties = new Properties();
        persistenceMappingProperties.setProperties(new Property[]{persistenceCtxt.getPersistanceRequiredProperty(), persistenceCtxt.getSizeProperty(),
                persistenceCtxt.getDeleteOnTerminationProperty()});

        return persistenceMappingProperties;
    }
View Full Code Here

            deployLBCluster(type, lbDataCtxt, tenantRange);
        }

        Service service = new MultiTenantService(type, autoscalingPolicyName, deploymentPolicyName, tenantId, cartridgeInfo, tenantRange);

        Properties serviceClusterProperties = null;
        if (lbDataCtxt.getLoadBalancedServiceProperties() != null && !lbDataCtxt.getLoadBalancedServiceProperties().isEmpty()) {
            serviceClusterProperties = new Properties();
            serviceClusterProperties.setProperties(lbDataCtxt.getLoadBalancedServiceProperties().toArray(new Property[0]));
        }

        // create
        service.create();
View Full Code Here

        Service lbService = new MultiTenantLBService(lbDataCtxt.getLbCartridgeInfo().getType(), lbDataCtxt.getAutoscalePolicy(),
                lbDataCtxt.getDeploymentPolicy(), -1234, lbDataCtxt.getLbCartridgeInfo(),
                tenantRange, loadBalancerCategory);

        Properties lbProperties = null;
        if (lbDataCtxt.getLbProperperties() != null && !lbDataCtxt.getLbProperperties().isEmpty())  {
            lbProperties = new Properties();
            lbProperties.setProperties(lbDataCtxt.getLbProperperties().toArray(new Property[0]));
        }

        // create service
        lbService.create();
View Full Code Here

TOP

Related Classes of org.apache.stratos.cloud.controller.stub.pojo.Properties

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.