use of io.fabric8.groups.internal.ZooKeeperGroupFactory in project fabric8 by jboss-fuse.
the class FabricDiscovery method addingService.
@Override
public CuratorFramework addingService(ServiceReference<CuratorFramework> reference) {
CuratorFramework curator = context.getService(reference);
try {
logger.debug("CuratorFramework found, starting group");
GroupFactory factory = new ZooKeeperGroupFactory(curator);
singleton = factory.createGroup("/fabric/registry/clusters/elasticsearch/" + clusterName.value(), ESNode.class);
singleton.add(this);
singleton.update(new ESNode(clusterName.value(), localNode, false));
singleton.start();
} catch (Exception e) {
LOG.error("Error starting group", e);
}
return curator;
}
Aggregations