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