@Override public boolean exists(String zPath) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, false) != null; } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public Stat getStatus(String zPath, Watcher watcher) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, watcher); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public Stat getStatus(String zPath) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, false); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public List<String> getChildren(String zPath) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getChildren(zPath, false); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public byte[] getData(String zPath, boolean watch, Stat stat) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getData(zPath, watch, stat); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public byte[] getData(String zPath, Watcher watcher, Stat stat) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getData(zPath, watcher, stat); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public List<String> getChildren(String zPath, Watcher watcher) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getChildren(zPath, watcher); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public boolean exists(String zPath, Watcher watcher) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, watcher) != null; } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public byte[] getData(String zPath, boolean watch, Stat stat) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getData(zPath, watch, stat); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public boolean exists(String zPath) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, false) != null; } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public Stat getStatus(String zPath) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, false); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public List<String> getChildren(String zPath) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getChildren(zPath, false); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public List<String> getChildren(String zPath, Watcher watcher) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getChildren(zPath, watcher); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public boolean exists(String zPath, Watcher watcher) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, watcher) != null; } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public byte[] getData(String zPath, Watcher watcher, Stat stat) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().getData(zPath, watcher, stat); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }
@Override public Stat getStatus(String zPath, Watcher watcher) throws KeeperException, InterruptedException { final Retry retry = getRetryFactory().createRetry(); while (true) { try { return getZooKeeper().exists(zPath, watcher); } catch (KeeperException e) { final Code code = e.code(); if (code == Code.CONNECTIONLOSS || code == Code.OPERATIONTIMEOUT || code == Code.SESSIONEXPIRED) { retryOrThrow(retry, e); } else { throw e; } } retry.waitForNextAttempt(); } }