public static boolean syncReplicatedServerList(Set currServerSet,String port,String passwd){
  try (Connection conn=getLDAPConnection("localhost",port,"cn=Directory Manager",passwd)){
    Set<String> dsServers=getServerSet(conn);
    if (dsServers == null) {
      return false;
    }
    for (    String tok : dsServers) {
      if (!currServerSet.contains(tok)) {
        delOpenDSServer(conn,tok);
      }
    }
  }
 catch (  Exception ex) {
    return false;
  }
  return true;
}

public static boolean syncReplicatedServerList ( Set currServerSet , String port , String passwd ) { try ( Connection conn = getLDAPConnection ( "localhost" , port , "cn=Directory Manager" , passwd ) ) { Set < String > dsServers = getServerSet ( conn ) ; if ( dsServers == null ) { return false ; } for ( String tok : dsServers ) { if ( ! currServerSet . contains ( tok ) ) { delOpenDSServer ( conn , tok ) ; } } } catch ( Exception ex ) { return false ; } return true ; }
synchronizes replication domain info with current list of openam servers .
