use of org.eclipse.winery.repository.targetallocation.criteria.minhosts.MinHosts in project winery by eclipse.
the class Allocation method getCriteria.
private Criteria getCriteria(AllocationRequest.CriteriaRequest criteriaRequest, int outputCap) throws AllocationException {
String criteriaType = criteriaRequest.getCriteria();
JsonNode params = criteriaRequest.getCriteriaParams();
switch(criteriaType) {
case "FulfillPolicies":
return new FulfillPolicies(params, outputCap);
case "MinHosts":
return new MinHosts(params, outputCap);
case "MinExternalConnections":
return new MinExternalConnections(params, outputCap);
default:
throw new AllocationException("Couldn't find criteria: " + criteriaType);
}
}
Aggregations