public void waitAllSitesDbStable(){
  String prefix="Waiting for DB cluster become stable on all sites ...";
  log.info(prefix);
  DbJmxClient geoInstance=getJmxClient(LOCALHOST);
  List<URI> vdcIdIter=queryByType(VirtualDataCenter.class,true);
  for (  URI vdcId : vdcIdIter) {
    log.info("loop db status check on {}",vdcId.toString());
    VirtualDataCenter vdc=queryObject(VirtualDataCenter.class,vdcId);
    if (!shouldCheckDbStatus(vdc)) {
      log.error("ignore vdc for db status check {}",vdcId);
      continue;
    }
    if (vdc.getConnectionStatus() != ConnectionStatus.DISCONNECTED) {
      Site activeSite=drUtil.getActiveSite(vdc.getShortId());
      waitDbNodesStable(geoInstance,vdc.getShortId(),activeSite.getNodeCount());
    }
  }
}

public void waitAllSitesDbStable ( ) { String prefix = "Waiting for DB cluster become stable on all sites ..." ; log . info ( prefix ) ; DbJmxClient geoInstance = getJmxClient ( LOCALHOST ) ; List < URI > vdcIdIter = queryByType ( VirtualDataCenter . class , true ) ; for ( URI vdcId : vdcIdIter ) { log . info ( "loop db status check on {}" , vdcId . toString ( ) ) ; VirtualDataCenter vdc = queryObject ( VirtualDataCenter . class , vdcId ) ; if ( ! shouldCheckDbStatus ( vdc ) ) { log . error ( "ignore vdc for db status check {}" , vdcId ) ; continue ; } if ( vdc . getConnectionStatus ( ) != ConnectionStatus . DISCONNECTED ) { Site activeSite = drUtil . getActiveSite ( vdc . getShortId ( ) ) ; waitDbNodesStable ( geoInstance , vdc . getShortId ( ) , activeSite . getNodeCount ( ) ) ; } } }
waits for the db instances joined in all sites
