use of com.yahoo.vespa.model.content.DispatchSpec in project vespa by vespa-engine.
the class DomDispatchBuilder method build.
public static DispatchSpec build(ModelElement contentXml) {
DispatchSpec.Builder builder = new DispatchSpec.Builder();
ModelElement dispatchElement = contentXml.getChild("dispatch");
if (dispatchElement == null) {
return builder.build();
}
builder.setNumDispatchGroups(dispatchElement.childAsInteger("num-dispatch-groups"));
List<ModelElement> groupsElement = dispatchElement.subElements("group");
if (groupsElement != null) {
builder.setGroups(buildGroups(groupsElement));
}
return builder.build();
}
Aggregations