use of com.yahoo.jrt.slobrok.api.Mirror in project vespa by vespa-engine.
the class SlobrokTest method setUp.
public void setUp() throws ListenFailedException {
slobrok = new Slobrok();
slobroks = new String[1];
slobroks[0] = new Spec("localhost", slobrok.port()).toString();
SlobrokList slobroklist = new SlobrokList();
slobroklist.setup(slobroks);
acceptor = server.listen(new Spec(0));
mirror = new Mirror(client, slobroklist);
register = new Register(server, slobroklist, "localhost", acceptor.port());
mySpec = new Spec("localhost", acceptor.port()).toString();
}
use of com.yahoo.jrt.slobrok.api.Mirror in project vespa by vespa-engine.
the class ExternalSlobrokPolicy method init.
@Override
public void init() {
if (slobroks != null) {
orb = new Supervisor(new Transport());
mirror = new Mirror(orb, slobroks);
}
if (configSources != null) {
if (mirror == null) {
orb = new Supervisor(new Transport());
subscriber = subscribe(slobrokConfigId, new ConfigSourceSet(configSources));
}
}
}
use of com.yahoo.jrt.slobrok.api.Mirror in project vespa by vespa-engine.
the class ExternalSlobrokPolicy method configure.
@Override
public synchronized void configure(SlobroksConfig config) {
String[] slist = new String[config.slobrok().size()];
for (int i = 0; i < config.slobrok().size(); i++) {
slist[i] = config.slobrok(i).connectionspec();
}
if (slobroks == null) {
slobroks = new SlobrokList();
}
slobroks.setup(slist);
if (mirror == null) {
mirror = new Mirror(orb, slobroks);
}
}
use of com.yahoo.jrt.slobrok.api.Mirror in project vespa by vespa-engine.
the class SlobrokClient method setSlobrokConnectionSpecs.
public void setSlobrokConnectionSpecs(String[] slobrokConnectionSpecs) {
if (equalsExistingSpec(slobrokConnectionSpecs))
return;
this.connectionSpecs = slobrokConnectionSpecs;
shutdown();
supervisor = new Supervisor(new Transport());
SlobrokList slist = new SlobrokList();
slist.setup(slobrokConnectionSpecs);
mirror = new Mirror(supervisor, slist);
freshMirror = true;
}
Aggregations