public SessionFailRetryLoop(CuratorZookeeperClient client, Mode _mode) { watcher = new tempWatcher <bool>(() => { sessionHasFailed = true; failedSessionThreads.GetOrAdd(ourThread, false); return(true); }); this.client = client; mode = _mode; retryLoop = client.NewRetryLoop(); }
/** * Return a new "session fail" retry loop. See {@link SessionFailRetryLoop} for details * on when to use it. * * @param mode failure mode * @return new retry loop */ public SessionFailRetryLoop newSessionFailRetryLoop(SessionFailRetryLoop.Mode mode) { return(new SessionFailRetryLoop(this, mode)); }