@PreDestroy public void stop() throws InterruptedException { stopped = true; zk.removeDefaultWatcher(connectStateWatcher); indexerCacheRefresher.shutdown(); }
@PreDestroy public void stop() throws InterruptedException { stopped = true; zk.removeDefaultWatcher(connectStateWatcher); indexerCacheRefresher.shutdown(); }
public void stop() throws InterruptedException { // Note that ZooKeeper does not have a way to remove watches (see ZOOKEEPER-422) stopped = true; zk.removeDefaultWatcher(connectStateWatcher); leaderProvisioner.shutdown(); if (leaderProvisioner.currentState == LeaderState.I_AM_LEADER) { try { callback.deactivateAsLeader(); } catch (InterruptedException e) { throw e; } catch (Throwable t) { log.error("Error stopping the leader for " + position, t); } } }
public void stop() throws InterruptedException { // Note that ZooKeeper does not have a way to remove watches (see ZOOKEEPER-422) stopped = true; zk.removeDefaultWatcher(connectStateWatcher); leaderProvisioner.shutdown(); if (leaderProvisioner.currentState == LeaderState.I_AM_LEADER) { try { callback.deactivateAsLeader(); } catch (InterruptedException e) { throw e; } catch (Throwable t) { log.error("Error stopping the leader for " + position, t); } } }