Package org.apache.stratos.autoscaler.exception

Examples of org.apache.stratos.autoscaler.exception.InvalidPolicyException


                log.info(String.format("Deploying deployment policy: [id] %s", policy.getId()));
            }
            fillPartitions(policy);
        } catch (InvalidPartitionException e) {
          log.error(e);
            throw new InvalidPolicyException(String.format("Deployment policy is invalid: [id] %s", policy.getId()), e);
        }

        this.addDeploymentPolicyToInformationModel(policy);
        RegistryManager.getInstance().persistDeploymentPolicy(policy);
View Full Code Here


            }
            autoscalePolicyListMap.put(asPolicy.getId(), asPolicy);
        } else {
          String errMsg = "Specified policy [" + asPolicy.getId() + "] already exists";
          log.error(errMsg);
            throw new InvalidPolicyException(errMsg);
        }
    }
View Full Code Here

                log.debug("Removing policy :" + policy);
            }
            autoscalePolicyListMap.remove(policy);
            RegistryManager.getInstance().removeAutoscalerPolicy(this.getAutoscalePolicy(policy));
        } else {
            throw new InvalidPolicyException("No such policy [" + policy + "] exists");
        }
    }
View Full Code Here

            PartitionManager.getInstance().deployNewNetworkPartitions(policy);
            deploymentPolicyListMap.put(policy.getId(), policy);
        } else {
          String errMsg = "Specified policy [" + policy.getId()+ "] already exists";
          log.error(errMsg);
            throw new InvalidPolicyException(errMsg);
        }
    }
View Full Code Here

            // undeploy the deployment policy.
            RegistryManager.getInstance().removeDeploymentPolicy(depPolicy);
            // remove from the infromation model.
            deploymentPolicyListMap.remove(policy);
        } else {
            throw new InvalidPolicyException("No such policy [" + policy + "] exists");
        }
    }
View Full Code Here

        throw new DeploymentException("File is not a valid deployment policy");
      }

    } catch (Exception e){
      log.error("Malformed deployment policy file", e);
      throw new InvalidPolicyException("Malformed deployment policy file",e);
    } finally{
      closeStream();
    }
    return policy;
  }
View Full Code Here

        throw new DeploymentException("File is not a valid autoscale policy");
      }

    } catch (Exception e){
      log.error("Malformed autoscale policy file", e);
      throw new InvalidPolicyException("Malformed autoscale policy file",e);
    } finally{
      closeStream();
    }
    return policy;
  }
View Full Code Here

TOP

Related Classes of org.apache.stratos.autoscaler.exception.InvalidPolicyException

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.