Changeset 2162


Ignore:
Timestamp:
2001-03-12T22:57:42+13:00 (23 years ago)
Author:
say1
Message:

logging fixes. clearing objects in the GUI to ease garbage collection. menu item to force global garbage collections.

Location:
trunk/java-client/org/nzdl/gsdl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/CSFrame.java

    r2159 r2162  
    7676    //fileMenu.addSeparator();
    7777    fileMenu.add( quitAction = new FileAction("Poll Server", POLL_ID)).setAccelerator(KeyStroke.getKeyStroke('P', Event.CTRL_MASK));;
     78    fileMenu.add( quitAction = new FileAction("Collect Garbage", GARBAGE_ID)).setAccelerator(KeyStroke.getKeyStroke('G', Event.CTRL_MASK));;
    7879    fileMenu.add( quitAction = new FileAction("Quit", QUIT_ID)).setAccelerator(KeyStroke.getKeyStroke('Q', Event.CTRL_MASK));;
    7980
     
    146147                     System.out.println("new group chosen from menu");
    147148                     break;
     149         case GARBAGE_ID:
     150           System.err.println("forcing gc...");
     151           System.gc() ;
     152           System.runFinalization();
     153           System.err.println("forcing gc...");
     154           System.gc() ;
     155           System.runFinalization();
     156           System.err.println("forced gc");
     157           break;
    148158                case POLL_ID:
    149159                     System.out.println("poll chosen from menu");
  • trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/Constants.java

    r2144 r2162  
    4646  final static int  QUIT_ID             = 104;
    4747  final static int  POLL_ID             = 105;
     48  final static int  GARBAGE_ID              = 106;
    4849
    4950/* Edit Menu */
  • trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/SearchPanel.java

    r2159 r2162  
    218218    resultsList.setSelectedIndex(0);
    219219      } // end else
     220      titleMap.clear();
     221      titleMetaData.clear();
     222      docIDs.clear();
    220223      windowParent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    221224    } // end if
     
    239242      else {
    240243      windowParent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
     244     
     245      //trash the old htmlDoc ...
     246      try {
     247        if (htmlDoc != null)
     248          htmlDoc.remove(0, htmlDoc.getLength());
     249      } catch (Exception exception) {
     250        throw new Error (exception.toString());
     251      }
     252
    241253      htmlDoc = new HTMLDocument();
    242254      try
  • trunk/java-client/org/nzdl/gsdl/service/NzdlLogWrapper.java

    r2157 r2162  
    6363      // the true is append ...
    6464      logFile = new FileWriter(logFilename, true);
    65       logFile.write(tag + "::Log started at:" + date + " == " + date.getTime());
    66       logFile.write(tag + "::timestamps in milliseconds since January 1, 1970, 00:00:00 GMT ");
     65      logFile.write(tag + "Log started at:" + date + " == " +
     66            date.getTime() + "\n");
     67      logFile.write(tag + "timestamps in milliseconds since January 1, 1970, 00:00:00 GMT \n");
    6768      logFile.flush();
    6869    } catch (Exception exception) {
Note: See TracChangeset for help on using the changeset viewer.