Package org.apache.stratos.autoscaler.partition

Examples of org.apache.stratos.autoscaler.partition.PartitionManager


        }
        return true;
    }

    private void fillPartitions(DeploymentPolicy deploymentPolicy) throws InvalidPartitionException {
        PartitionManager partitionMgr = PartitionManager.getInstance();
        for (Partition partition : deploymentPolicy.getAllPartitions()) {
            String partitionId = partition.getId();
            if ((partitionId == null) || (!partitionMgr.partitionExist(partitionId))) {
                String msg = "Could not find partition: [id] " + partitionId + ". " +
                        "Please deploy the partitions before deploying the deployment policies.";               
                throw new InvalidPartitionException(msg);
            }
           
View Full Code Here


    }
    public void _listPartitions (CommandInterpreter ci){
      String partitionId = ci.nextArgument();
     
      PartitionManager pm = PartitionManager.getInstance();
     
      if(StringUtils.isBlank(partitionId)){
        Partition[] partitionArr = pm.getAllPartitions();
          for(Partition partition : partitionArr){
            ci.println(partition.toString());
          }
      }else{
        Partition partition = pm.getPartitionById(partitionId);
        if(partition != null){ 
          ci.println(partition);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.autoscaler.partition.PartitionManager

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.