173174175176177178179180181182183
}; RetryHarness harness = new RetryHarness(retry, new FixedRetryPolicy(3), true); try { return harness.attempt(); } catch (IOException i) { throw i; } catch (Exception e) { throw new IOException("Unexpected exception connecting to ZK", e); }
211212213214215216217218219220221
}; RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff( RETRY_PAUSE_MS, MAX_RETRIES), true); try { harness.attempt(); return retry.getResult(); } catch (Exception e) { throw new IOException(e); } }
231232233234235236237238239240241
251252253254255256257258259260261
274275276277278279280281282283284
}; RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff( RETRY_PAUSE_MS, MAX_RETRIES), true); try { harness.attempt(); return retry.getResult(); } catch (Exception e) { throw new IOException(e); }
292293294295296297298299300301302
311312313314315316317318319320321
}; RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff( RETRY_PAUSE_MS, MAX_RETRIES), true); try { harness.attempt(); } catch (Exception e) { throw new IOException(e); } }
331332333334335336337338339340341
209210211212213214215216217218219
229230231232233234235236237238239