avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: avalon-excalibur/store/src/java/org/apache/excalibur/store/impl AbstractFilesystemStore.java AbstractJispFilesystemStore.java StoreJanitorImpl.java
Date Tue, 29 Jul 2003 03:58:35 GMT
vgritsenko    2003/07/28 20:58:35

  Modified:    store/src/java/org/apache/excalibur/store/impl
                        AbstractFilesystemStore.java
                        AbstractJispFilesystemStore.java
                        StoreJanitorImpl.java
  Log:
  Minor style changes: this.getLogger() -> getLogger() etc.
  
  Revision  Changes    Path
  1.10      +3 -3      avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/AbstractFilesystemStore.java
  
  Index: AbstractFilesystemStore.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/AbstractFilesystemStore.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractFilesystemStore.java	22 Mar 2003 12:46:55 -0000	1.9
  +++ AbstractFilesystemStore.java	29 Jul 2003 03:58:33 -0000	1.10
  @@ -141,7 +141,7 @@
           final File file = fileFromKey(key);
   
           if (file != null && file.exists()) {
  -            if (this.getLogger().isDebugEnabled()) {
  +            if (getLogger().isDebugEnabled()) {
                   getLogger().debug("Found file: " + key);
               }
               try {
  @@ -150,7 +150,7 @@
                   getLogger().error("Error during deseralization.", any);
               }
           } else {
  -            if (this.getLogger().isDebugEnabled()) {
  +            if (getLogger().isDebugEnabled()) {
                   getLogger().debug("NOT Found file: " + key);
               }
           }
  
  
  
  1.14      +12 -12    avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/AbstractJispFilesystemStore.java
  
  Index: AbstractJispFilesystemStore.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/AbstractJispFilesystemStore.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- AbstractJispFilesystemStore.java	14 Jul 2003 19:07:30 -0000	1.13
  +++ AbstractJispFilesystemStore.java	29 Jul 2003 03:58:34 -0000	1.14
  @@ -165,10 +165,10 @@
   
           if (getLogger().isDebugEnabled()) 
           {
  -            this.getLogger().debug("store(): Store file with key: "
  -                                  + key.toString());
  -            this.getLogger().debug("store(): Store file with value: "
  -                                  + value.toString());
  +            getLogger().debug("store(): Store file with key: "
  +                              + key.toString());
  +            getLogger().debug("store(): Store file with value: "
  +                              + value.toString());
           }
   
           if (value instanceof Serializable) 
  @@ -181,7 +181,7 @@
               } 
               catch (Exception e) 
               {
  -                this.getLogger().error("store(..): Exception", e);
  +                getLogger().error("store(..): Exception", e);
               }
           } 
           else 
  @@ -219,7 +219,7 @@
           
           if (getLogger().isDebugEnabled()) 
           {
  -            this.getLogger().debug("clear(): Clearing the database ");
  +            getLogger().debug("clear(): Clearing the database ");
           }
   
           try 
  @@ -233,7 +233,7 @@
                   {
                       if (getLogger().isDebugEnabled()) 
                       {
  -                        this.getLogger().debug("clear(): Removing key: " + tmp.toString());
  +                        getLogger().debug("clear(): Removing key: " + tmp.toString());
                       }
                       iter.moveNext();
                       this.remove( tmp );
  @@ -256,7 +256,7 @@
       {
           if (getLogger().isDebugEnabled()) 
           {
  -            this.getLogger().debug("remove(..) Remove item");
  +            getLogger().debug("remove(..) Remove item");
           }
   
           try 
  @@ -270,7 +270,7 @@
           } 
           catch (Exception e) 
           {
  -            this.getLogger().error("remove(..): Exception", e);
  +            getLogger().error("remove(..): Exception", e);
           }
       }
   
  @@ -289,7 +289,7 @@
               res = m_Index.findKey(this.wrapKeyObject(key));
               if (getLogger().isDebugEnabled()) 
               {
  -                this.getLogger().debug("containsKey(..): res=" + res);
  +                getLogger().debug("containsKey(..): res=" + res);
               }
           } 
           catch (KeyNotFound ignore) 
  @@ -297,7 +297,7 @@
           } 
           catch (Exception e)
           {
  -            this.getLogger().error("containsKey(..): Exception", e);
  +            getLogger().error("containsKey(..): Exception", e);
           }
   
           if (res > 0) 
  
  
  
  1.8       +46 -46    avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/StoreJanitorImpl.java
  
  Index: StoreJanitorImpl.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/StoreJanitorImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StoreJanitorImpl.java	20 May 2003 21:03:39 -0000	1.7
  +++ StoreJanitorImpl.java	29 Jul 2003 03:58:34 -0000	1.8
  @@ -108,8 +108,8 @@
        * @exception ConfigurationException
        */
       public void parameterize(Parameters params) throws ParameterException {
  -        if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("Configure StoreJanitorImpl");
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Configure StoreJanitorImpl");
           }
           this.setJVM(Runtime.getRuntime());
   
  @@ -143,8 +143,8 @@
       public void start() {
           doRun = true;
           Thread checker = new Thread(this);
  -        if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("Intializing checker thread");
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Intializing checker thread");
           }
           checker.setPriority(this.getPriority());
           checker.setDaemon(true);
  @@ -163,18 +163,18 @@
           while (doRun) {
               // amount of memory used is greater then heapsize
               if (this.memoryLow()) {
  -                if (this.getLogger().isDebugEnabled()) {
  -                    this.getLogger().debug("Invoking garbage collection, total memory =
"
  -                            + this.getJVM().totalMemory() + ", free memory = "
  -                            + this.getJVM().freeMemory());
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("Invoking garbage collection, total memory = "
  +                                      + getJVM().totalMemory() + ", free memory = "
  +                                      + getJVM().freeMemory());
                   }
   
                   //this.freePhysicalMemory();
   
  -                if (this.getLogger().isDebugEnabled()) {
  -                    this.getLogger().debug("Garbage collection complete, total memory =
"
  -                        + this.getJVM().totalMemory() + ", free memory = "
  -                        + this.getJVM().freeMemory());
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("Garbage collection complete, total memory = "
  +                                      + getJVM().totalMemory() + ", free memory = "
  +                                      + getJVM().freeMemory());
                   }
   
                   synchronized (this) {
  @@ -196,20 +196,20 @@
        * @return true if memory is low
        */
       private boolean memoryLow() {
  -        if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("JVM total Memory: " + this.getJVM().totalMemory());
  -            this.getLogger().debug("JVM free Memory: " + this.getJVM().freeMemory());
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("JVM total Memory: " + getJVM().totalMemory());
  +            getLogger().debug("JVM free Memory: " + getJVM().freeMemory());
           }
   
  -        if((this.getJVM().totalMemory() > this.getHeapsize())
  -            && (this.getJVM().freeMemory() < this.getFreememory())) {
  -            if (this.getLogger().isDebugEnabled()) {
  -                this.getLogger().debug("Memory is low = true");
  +        if ((getJVM().totalMemory() > this.getHeapsize())
  +            && (getJVM().freeMemory() < this.getFreememory())) {
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Memory is low = true");
               }
               return true;
           } else {
  -            if (this.getLogger().isDebugEnabled()) {
  -                this.getLogger().debug("Memory is low = false");
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Memory is low = false");
               }
               return false;
           }
  @@ -222,10 +222,10 @@
        */
       public void register(Store store) {
           this.getStoreList().add(store);
  -        if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("Registering store instance");
  -            this.getLogger().debug("Size of StoreJanitor now:"
  -                                   + this.getStoreList().size());
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Registering store instance");
  +            getLogger().debug("Size of StoreJanitor now:"
  +                              + this.getStoreList().size());
           }
       }
   
  @@ -236,10 +236,10 @@
        */
       public void unregister(Store store) {
           this.getStoreList().remove(store);
  -        if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("Unregister store instance");
  -            this.getLogger().debug("Size of StoreJanitor now:"
  -                                   + this.getStoreList().size());
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Unregister store instance");
  +            getLogger().debug("Size of StoreJanitor now:"
  +                              + this.getStoreList().size());
           }
       }
   
  @@ -267,17 +267,17 @@
   
           try {
               //Determine elements in Store:
  -            if (this.getLogger().isDebugEnabled()) {
  -                this.getLogger().debug("StoreList size=" + this.getStoreList().size());
  -                this.getLogger().debug("Actual Index position: " + this.getIndex());
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("StoreList size=" + this.getStoreList().size());
  +                getLogger().debug("Actual Index position: " + this.getIndex());
               }
               if (this.getIndex() < this.getStoreList().size()) {
                   if(this.getIndex() == -1) {
                       this.setIndex(0);
                       store = (Store)this.getStoreList().get(this.getIndex());
   
  -                    if (this.getLogger().isDebugEnabled()) {
  -                        this.getLogger().debug("Freeing Store: " + this.getIndex());
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Freeing Store: " + this.getIndex());
                       }
   
                       //delete proportionate elements out of the cache as
  @@ -289,8 +289,8 @@
                   } else {
                       store = (Store)this.getStoreList().get(this.getIndex());
   
  -                    if (this.getLogger().isDebugEnabled()) {
  -                        this.getLogger().debug("Freeing Store: " + this.getIndex());
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Freeing Store: " + this.getIndex());
                       }
   
                       //delete proportionate elements out of the cache as
  @@ -301,8 +301,8 @@
                       }
                   }
               } else {
  -                if (this.getLogger().isDebugEnabled()) {
  -                    this.getLogger().debug("Starting from the beginning");
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("Starting from the beginning");
                   }
   
                   this.resetIndex();
  @@ -317,7 +317,7 @@
                   }
               }
           } catch(Exception e) {
  -            this.getLogger().error("Error in freeMemory()",e);
  +            getLogger().error("Error in freeMemory()",e);
           }
       }
   
  @@ -340,8 +340,8 @@
       /**
        * This method forces the garbage collector
       private void freePhysicalMemory() {
  -        this.getJVM().runFinalization();
  -        this.getJVM().gc();
  +        getJVM().runFinalization();
  +        getJVM().gc();
       }
        */
   
  @@ -394,8 +394,8 @@
       }
   
       private void setIndex(int _index) {
  -        if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("Setting index=" + _index);
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Setting index=" + _index);
           }
           this.index = _index;
       }
  @@ -405,8 +405,8 @@
       }
   
       private void resetIndex() {
  -        if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("Reseting index");
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Reseting index");
           }
           this.index = -1;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message