/** * Returns node's data */ public byte[] getData(final String path, final Watcher watcher, final Stat stat, boolean retryOnConnLoss) throws KeeperException, InterruptedException { if (retryOnConnLoss) { return zkCmdExecutor.retryOperation(() -> keeper.getData(path, wrapWatcher(watcher), stat)); } else { return keeper.getData(path, wrapWatcher(watcher), stat); } }
/** * Returns children of the node at the path */ public List<String> getChildren(final String path, final Watcher watcher, boolean retryOnConnLoss) throws KeeperException, InterruptedException { if (retryOnConnLoss) { return zkCmdExecutor.retryOperation(() -> keeper.getChildren(path, wrapWatcher(watcher))); } else { return keeper.getChildren(path, wrapWatcher(watcher)); } }
/** * Return the stat of the node of the given path. Return null if no such a * node exists. * <p> * If the watch is non-null and the call is successful (no exception is thrown), * a watch will be left on the node with the given path. The watch will be * triggered by a successful operation that creates/delete the node or sets * the data on the node. * * @param path the node path * @param watcher explicit watcher * @return the stat of the node of the given path; return null if no such a * node exists. * @throws KeeperException If the server signals an error * @throws InterruptedException If the server transaction is interrupted. * @throws IllegalArgumentException if an invalid path is specified */ public Stat exists(final String path, final Watcher watcher, boolean retryOnConnLoss) throws KeeperException, InterruptedException { if (retryOnConnLoss) { return zkCmdExecutor.retryOperation(() -> keeper.exists(path, wrapWatcher(watcher))); } else { return keeper.exists(path, wrapWatcher(watcher)); } }
/** * Returns children of the node at the path */ public List<String> getChildren(final String path, final Watcher watcher, boolean retryOnConnLoss) throws KeeperException, InterruptedException { if (retryOnConnLoss) { return zkCmdExecutor.retryOperation(new ZkOperation() { @Override public List<String> execute() throws KeeperException, InterruptedException { return keeper.getChildren(path, wrapWatcher(watcher)); } }); } else { return keeper.getChildren(path, wrapWatcher(watcher)); } }
/** * Returns node's data */ public byte[] getData(final String path, final Watcher watcher, final Stat stat, boolean retryOnConnLoss) throws KeeperException, InterruptedException { if (retryOnConnLoss) { return zkCmdExecutor.retryOperation(new ZkOperation() { @Override public byte[] execute() throws KeeperException, InterruptedException { return keeper.getData(path, wrapWatcher(watcher), stat); } }); } else { return keeper.getData(path, wrapWatcher(watcher), stat); } }
return keeper.exists(path, wrapWatcher(watcher));
strat.connect(zkServerAddress, zkClientTimeout, wrapWatcher(connManager), new ZkUpdate() { @Override
strat.connect(zkServerAddress, zkClientTimeout, wrapWatcher(connManager), zooKeeper -> { SolrZooKeeper oldKeeper = keeper;