use of com.yahoo.vespa.model.content.ResourceLimits in project vespa by vespa-engine.
the class DomResourceLimitsBuilder method build.
public static ResourceLimits build(ModelElement contentXml) {
ResourceLimits.Builder builder = new ResourceLimits.Builder();
ModelElement resourceLimits = contentXml.getChild("resource-limits");
if (resourceLimits == null) {
return builder.build();
}
if (resourceLimits.getChild("disk") != null) {
builder.setDiskLimit(resourceLimits.childAsDouble("disk"));
}
if (resourceLimits.getChild("memory") != null) {
builder.setMemoryLimit(resourceLimits.childAsDouble("memory"));
}
return builder.build();
}
Aggregations