cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/store MemoryStore.java
Date Sun, 26 Mar 2000 13:18:58 GMT
stefano     00/03/26 05:18:58

  Modified:    src/org/apache/cocoon/store MemoryStore.java
  Log:
  cleanups for picky Kevin ;-)
  
  Revision  Changes    Path
  1.10      +7 -6      xml-cocoon/src/org/apache/cocoon/store/MemoryStore.java
  
  Index: MemoryStore.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/store/MemoryStore.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MemoryStore.java	2000/03/25 12:50:21	1.9
  +++ MemoryStore.java	2000/03/26 13:18:58	1.10
  @@ -1,4 +1,4 @@
  -/*-- $Id: MemoryStore.java,v 1.9 2000/03/25 12:50:21 stefano Exp $ --
  +/*-- $Id: MemoryStore.java,v 1.10 2000/03/26 13:18:58 stefano Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -66,7 +66,7 @@
    * sending a note about a method to do it.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.9 $ $Date: 2000/03/25 12:50:21 $
  + * @version $Revision: 1.10 $ $Date: 2000/03/26 13:18:58 $
    */
   
   public class MemoryStore implements Store, Status {
  @@ -75,7 +75,7 @@
        * Indicates how much memory should be left free in the JVM for
        * normal operation.
        */
  -    private static final int memory = 500000;
  +    private static final int MEMORY = 500000;
   
       private Runtime jvm;
       private Hashtable hashtable;
  @@ -110,7 +110,7 @@
        * virtual machine is restarted or some error happens.
        */
       public synchronized void hold(Object key, Object object) {
  -        if (jvm.freeMemory() < memory) this.free();
  +        if (jvm.freeMemory() < MEMORY) this.free();
           this.hashtable.put(key, new Container(object));
       }
   
  @@ -217,14 +217,15 @@
           // give back info on the total memory used.
           StringBuffer buffer = new StringBuffer();
           buffer.append("Memory Object Storage System:<br>");
  -        buffer.append("Minimum required free memory:  " + memory + "<br>");
  -        buffer.append("Current free memory: " + this.jvm.freeMemory() + "<br>");
  +        buffer.append("Minimum required free memory:  " + MEMORY + "<br>");
  +        buffer.append("Current free memory: " + this.jvm.freeMemory() + "<br><ul>");
           Enumeration e = list();
           while (e.hasMoreElements()) {
               buffer.append("<li>");
               buffer.append(e.nextElement());
               buffer.append("</li>");
           }
  +        buffer.append("</ul>");
           return buffer.toString();
       }
   }
  
  
  

Mime
View raw message