Ignore:
Timestamp:
2001-04-03T15:45:23+12:00 (23 years ago)
Author:
say1
Message:

renamed SimpleServer.java Proxy.java. Fixed bug in NzdlServiceFactory.java. Fixed NzdlMultiWayWrapper.java so i only found a single instance of each collection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/org/nzdl/gsdl/service/NzdlMultiWayWrapper.java

    r2220 r2269  
    7676      if (NzdlPreferences.getBoolean("Log at the NzdlService level"))
    7777    server = new NzdlLogWrapper(server,
    78                     "log.file.after.split." + key + "cache",
     78                    "log.file.after.split." + i + ".cache",
    7979                    "AFTER:" + key + ": ");
    8080      services.put("" +i, server);
     
    8787    return result;
    8888  }
     89
    8990  String findCollection(String _name) {
    9091    String result = "";
     
    117118  public Set getCollectionSet( ) {
    118119    Set results = new HashSet();
     120    Hashtable intermediate = new Hashtable();
    119121
    120122    Enumeration e = services.keys();
     
    126128      while (s.hasNext()) {
    127129    String coll = (String) s.next();
    128     results.add("" + i + ":" + coll);
     130    String collname = "" + i + ":" + coll;
     131    boolean hit = false;
     132    for (int j = 0; j < i; j++) {
     133      String oldcollname = "" + j + ":" + coll;
     134      if (intermediate.get(oldcollname) != null) {
     135       
     136        NzdlService oldServer = (NzdlService) services.get( "" + j );
     137        NzdlCollectionInfo oldColl = oldServer.getCollectionInfo(coll);
     138        NzdlCollectionInfo newColl = server.getCollectionInfo(coll);
     139       
     140        if (oldColl.getBuildDate() == newColl.getBuildDate() &&
     141        oldColl.getNumOfDocs() == newColl.getNumOfDocs() &&
     142        oldColl.getNumOfWords() == newColl.getNumOfWords() &&
     143        oldColl.getNumOfBytes() == newColl.getNumOfBytes() &&
     144        oldColl.isPublic() == newColl.isPublic() )
     145          hit = true;
     146      }
     147    }
     148    if (hit == false) {
     149      intermediate.put(collname,collname);
     150      results.add("" + i + ":" + coll);
     151    }
    129152      }
    130153    }
Note: See TracChangeset for help on using the changeset viewer.