use of com.ctrip.xpipe.redis.core.config.MetaServerAddressAware in project x-pipe by ctripcorp.
the class AbstractIntegratedTest method createMetaService.
protected MetaServerKeeperService createMetaService(final List<MetaServerMeta> metaServerMetas) {
DefaultMetaServerLocator metaServerLocator = new DefaultMetaServerLocator(new MetaServerAddressAware() {
@Override
public String getMetaServerUrl() {
return String.format("http://%s:%d", "localhost", metaServerMetas.get(0).getPort());
}
});
DefaultMetaService metaService = new DefaultMetaService();
metaService.setConfig(new DefaultKeeperConfig());
metaService.setMetaServerLocator(metaServerLocator);
return metaService;
}
Aggregations