use of com.yahoo.vespa.model.admin.Slobrok in project vespa by vespa-engine.
the class DomAdminV4Builder method createSlobroks.
private void createSlobroks(Admin admin, Collection<HostResource> hosts) {
// No slobroks can be created (and none are needed)
if (hosts.isEmpty())
return;
List<Slobrok> slobroks = new ArrayList<>();
int index = 0;
for (HostResource host : hosts) {
Slobrok slobrok = new Slobrok(admin, index++);
slobrok.setHostResource(host);
slobroks.add(slobrok);
slobrok.initService();
}
admin.addSlobroks(slobroks);
}
use of com.yahoo.vespa.model.admin.Slobrok in project vespa by vespa-engine.
the class DomAdminV2Builder method getExplicitSlobrokSetup.
private List<Slobrok> getExplicitSlobrokSetup(AbstractConfigProducer parent, Element slobroksE) {
List<Slobrok> slobs = new ArrayList<>();
List<Element> slobsE = XML.getChildren(slobroksE, "slobrok");
int i = 0;
for (Element e : slobsE) {
Slobrok slob = new SlobrokBuilder(i).build(parent, e);
slobs.add(slob);
i++;
}
return slobs;
}
Aggregations