@Deprecated public void updateClusterState() throws KeeperException, InterruptedException {
synchronized (getUpdateLock()) {
    if (clusterState == null) {
      createClusterStateWatchersAndUpdate();
      return;
    }
    refreshCollectionList(null);
    refreshLiveNodes(null);
    refreshLegacyClusterState(null);
    Collection<String> safeCopy=new ArrayList<>(watchedCollectionStates.keySet());
    Set<String> updatedCollections=new HashSet<>();
    for (    String coll : safeCopy) {
      DocCollection newState=fetchCollectionState(coll,null);
      if (updateWatchedCollection(coll,newState)) {
        updatedCollections.add(coll);
      }
    }
    constructState(updatedCollections);
  }
}

@ Deprecated public void updateClusterState ( ) throws KeeperException , InterruptedException { synchronized ( getUpdateLock ( ) ) { if ( clusterState == null ) { createClusterStateWatchersAndUpdate ( ) ; return ; } refreshCollectionList ( null ) ; refreshLiveNodes ( null ) ; refreshLegacyClusterState ( null ) ; Collection < String > safeCopy = new ArrayList < > ( watchedCollectionStates . keySet ( ) ) ; Set < String > updatedCollections = new HashSet < > ( ) ; for ( String coll : safeCopy ) { DocCollection newState = fetchCollectionState ( coll , null ) ; if ( updateWatchedCollection ( coll , newState ) ) { updatedCollections . add ( coll ) ; } } constructState ( updatedCollections ) ; } }
forcibly refresh cluster state from zk . do this only to avoid race conditions because it ' s expensive .
