@PostConstruct
 public void start() throws Exception {
   handler = new RemotePoolManagerHandler(new CellAddressCore(serviceName));
   cache = new PathChildrenCache(client, getZooKeeperPath(), true);
   cache.getListenable().addListener(this);
   cache.start();
 }
Ejemplo n.º 2
0
 void onChange(Consumer<PathChildrenCacheEvent> consumer) {
   cores.getListenable().addListener((client, event) -> consumer.accept(event));
 }