public void forceUpdateCollection(String collection) throws KeeperException, InterruptedException {
synchronized (getUpdateLock()) {
    if (clusterState == null) {
      LOG.warn("ClusterState watchers have not been initialized");
      return;
    }
    ClusterState.CollectionRef ref=clusterState.getCollectionRef(collection);
    if (ref == null || legacyCollectionStates.containsKey(collection)) {
      LOG.debug("Checking legacy cluster state for collection {}",collection);
      refreshLegacyClusterState(null);
      if (!legacyCollectionStates.containsKey(collection)) {
        LazyCollectionRef tryLazyCollection=new LazyCollectionRef(collection);
        if (tryLazyCollection.get() != null) {
          LOG.debug("Adding lazily-loaded reference for collection {}",collection);
          lazyCollectionStates.putIfAbsent(collection,tryLazyCollection);
          constructState(Collections.singleton(collection));
        }
      }
    }
 else     if (ref.isLazilyLoaded()) {
      LOG.debug("Refreshing lazily-loaded state for collection {}",collection);
      if (ref.get() != null) {
        return;
      }
      refreshLegacyClusterState(null);
    }
 else     if (watchedCollectionStates.containsKey(collection)) {
      LOG.debug("Forcing refresh of watched collection state for {}",collection);
      DocCollection newState=fetchCollectionState(collection,null);
      if (updateWatchedCollection(collection,newState)) {
        constructState(Collections.singleton(collection));
      }
    }
 else {
      LOG.error("Collection {} is not lazy or watched!",collection);
    }
  }
}

public void forceUpdateCollection ( String collection ) throws KeeperException , InterruptedException { synchronized ( getUpdateLock ( ) ) { if ( clusterState == null ) { LOG . warn ( "ClusterState watchers have not been initialized" ) ; return ; } ClusterState . CollectionRef ref = clusterState . getCollectionRef ( collection ) ; if ( ref == null || legacyCollectionStates . containsKey ( collection ) ) { LOG . debug ( "Checking legacy cluster state for collection {}" , collection ) ; refreshLegacyClusterState ( null ) ; if ( ! legacyCollectionStates . containsKey ( collection ) ) { LazyCollectionRef tryLazyCollection = new LazyCollectionRef ( collection ) ; if ( tryLazyCollection . get ( ) != null ) { LOG . debug ( "Adding lazily-loaded reference for collection {}" , collection ) ; lazyCollectionStates . putIfAbsent ( collection , tryLazyCollection ) ; constructState ( Collections . singleton ( collection ) ) ; } } } else if ( ref . isLazilyLoaded ( ) ) { LOG . debug ( "Refreshing lazily-loaded state for collection {}" , collection ) ; if ( ref . get ( ) != null ) { return ; } refreshLegacyClusterState ( null ) ; } else if ( watchedCollectionStates . containsKey ( collection ) ) { LOG . debug ( "Forcing refresh of watched collection state for {}" , collection ) ; DocCollection newState = fetchCollectionState ( collection , null ) ; if ( updateWatchedCollection ( collection , newState ) ) { constructState ( Collections . singleton ( collection ) ) ; } } else { LOG . error ( "Collection {} is not lazy or watched!" , collection ) ; } } }
forcibly refresh a collection ' s internal state from zk . try to avoid having to resort to this when a better design is possible .
