/** * Creates a {@link ZKClient} that will perform auto re-watch on all existing watches * when reconnection happens after session expiration. All {@link org.apache.zookeeper.Watcher Watchers} * set through the returned {@link ZKClient} would not receive any connection events. * * @param client The {@link ZKClient} for operations delegation. * @return A {@link ZKClient} that will do auto re-watch on all methods that accept a * {@link org.apache.zookeeper.Watcher} upon session expiration. */ public static ZKClient reWatchOnExpire(ZKClient client) { return new RewatchOnExpireZKClient(client); }
/** * Creates a {@link ZKClient} that will perform auto re-watch on all existing watches * when reconnection happens after session expiration. All {@link org.apache.zookeeper.Watcher Watchers} * set through the returned {@link ZKClient} would not receive any connection events. * * @param client The {@link ZKClient} for operations delegation. * @return A {@link ZKClient} that will do auto re-watch on all methods that accept a * {@link org.apache.zookeeper.Watcher} upon session expiration. */ public static ZKClient reWatchOnExpire(ZKClient client) { return new RewatchOnExpireZKClient(client); }