cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r499582 - /cocoon/trunk/core/cocoon-store/cocoon-store-impl/src/main/java/org/apache/cocoon/components/store/impl/MRUMemoryStore.java
Date Wed, 24 Jan 2007 21:52:58 GMT
Author: danielf
Date: Wed Jan 24 13:52:57 2007
New Revision: 499582

URL: http://svn.apache.org/viewvc?view=rev&rev=499582
Log:
"Excalibur instrumentation support was removed long time ago from the trunk. So no support
for it is necessary." according to Vadim, so I removed it.

Modified:
    cocoon/trunk/core/cocoon-store/cocoon-store-impl/src/main/java/org/apache/cocoon/components/store/impl/MRUMemoryStore.java

Modified: cocoon/trunk/core/cocoon-store/cocoon-store-impl/src/main/java/org/apache/cocoon/components/store/impl/MRUMemoryStore.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-store/cocoon-store-impl/src/main/java/org/apache/cocoon/components/store/impl/MRUMemoryStore.java?view=diff&rev=499582&r1=499581&r2=499582
==============================================================================
--- cocoon/trunk/core/cocoon-store/cocoon-store-impl/src/main/java/org/apache/cocoon/components/store/impl/MRUMemoryStore.java
(original)
+++ cocoon/trunk/core/cocoon-store/cocoon-store-impl/src/main/java/org/apache/cocoon/components/store/impl/MRUMemoryStore.java
Wed Jan 24 13:52:57 2007
@@ -24,16 +24,12 @@
 import java.util.LinkedList;
 import java.util.NoSuchElementException;
 
+import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.excalibur.store.Store;
 import org.apache.excalibur.store.StoreJanitor;
 
-// import org.apache.excalibur.instrument.CounterInstrument;
-// import org.apache.excalibur.instrument.Instrument;
-// import org.apache.excalibur.instrument.Instrumentable;
-// import org.apache.excalibur.instrument.ValueInstrument;
-
 /**
  * This class provides a cache algorithm for the requested documents. It
  * combines a HashMap and a LinkedList to create a so called MRU (Most Recently
@@ -49,7 +45,6 @@
     /** By default we use the logger for this class. */
     private Log logger = LogFactory.getLog(getClass());
 
-    // private String instrumentableName;
     private int maxObjects = MAX_OBJECTS;
 
     protected boolean persistent = false;
@@ -62,11 +57,6 @@
 
     private LinkedList mrulist;
 
-    // private ValueInstrument sizeInstrument = new ValueInstrument("size");
-    // private CounterInstrument hitsInstrument = new CounterInstrument("hits");
-    // private CounterInstrument missesInstrument = new
-    // CounterInstrument("misses");
-
     public Log getLogger() {
         return this.logger;
     }
@@ -200,7 +190,6 @@
         this.cache.put(key, value);
         this.mrulist.remove(key);
         this.mrulist.addFirst(key);
-        // this.sizeInstrument.setValue( this.mrulist.size() );
     }
 
     /**
@@ -219,7 +208,6 @@
             if (getLogger().isDebugEnabled()) {
                 getLogger().debug("Found key: " + key.toString());
             }
-            // this.hitsInstrument.increment();
             return value;
         }
 
@@ -235,14 +223,12 @@
                     if (!this.cache.containsKey(key)) {
                         hold(key, value);
                     }
-                    // this.hitsInstrument.increment();
                     return value;
                 } catch (Exception e) {
                     getLogger().error("Error in get()!", e);
                 }
             }
         }
-        // this.missesInstrument.increment();
         return null;
     }
 
@@ -259,7 +245,6 @@
         }
         this.cache.remove(key);
         this.mrulist.remove(key);
-        // this.sizeInstrument.setValue( this.mrulist.size() );
 
         if (this.persistent && key != null) {
             this.persistentStore.remove(key);
@@ -278,7 +263,6 @@
             }
             remove(key);
         }
-        // this.sizeInstrument.setValue( 0 );
     }
 
     /**
@@ -344,8 +328,6 @@
                         }
                     }
                 }
-
-                // this.sizeInstrument.setValue( this.mrulist.size() );
             }
         } catch (NoSuchElementException e) {
             getLogger().warn("Concurrency error in free()", e);
@@ -368,17 +350,4 @@
 
         return (object instanceof java.io.Serializable);
     }
-
-    /*
-     * public void setInstrumentableName(String name) { this.instrumentableName =
-     * name; }
-     * 
-     * public String getInstrumentableName() { return this.instrumentableName; }
-     * 
-     * public Instrument[] getInstruments() { return new Instrument[] {
-     * this.sizeInstrument, this.hitsInstrument, this.missesInstrument }; }
-     * 
-     * public Instrumentable[] getChildInstrumentables() { return
-     * Instrumentable.EMPTY_INSTRUMENTABLE_ARRAY; }
-     */
 }



Mime
View raw message