[jboss-cvs] JBossCache/src/org/jboss/cache/eviction ...

Manik Surtani msurtani at jboss.com
Thu Feb 1 12:59:01 EST 2007


  User: msurtani
  Date: 07/02/01 12:59:01

  Modified:    src/org/jboss/cache/eviction  BaseEvictionAlgorithm.java
  Log:
  fixed unreachable code block (to treat added nodes as visited)
  
  Revision  Changes    Path
  1.21      +15 -10    JBossCache/src/org/jboss/cache/eviction/BaseEvictionAlgorithm.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BaseEvictionAlgorithm.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/eviction/BaseEvictionAlgorithm.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -b -r1.20 -r1.21
  --- BaseEvictionAlgorithm.java	25 Jan 2007 21:54:04 -0000	1.20
  +++ BaseEvictionAlgorithm.java	1 Feb 2007 17:59:01 -0000	1.21
  @@ -23,7 +23,7 @@
    * abstract methods and a policy.
    *
    * @author Daniel Huang - dhuang at jboss.org 10/2005
  - * @version $Revision: 1.20 $
  + * @version $Revision: 1.21 $
    */
   public abstract class BaseEvictionAlgorithm implements EvictionAlgorithm
   {
  @@ -282,6 +282,11 @@
            {
               ne.setNumberOfElements(ne.getNumberOfElements() + numAddedElements);
            }
  +         if (log.isTraceEnabled())
  +         {
  +            log.trace("Queue already contains " + ne.getFqn() + " processing it as visited");
  +         }
  +         this.processVisitedNodes(ne.getFqn());
            return;
         }
   
  @@ -291,15 +296,15 @@
         ne.setNumberOfNodeVisits(1);
         ne.setNumberOfElements(numAddedElements);
         // add it to the node map and eviction queue
  -      if (evictionQueue.containsNodeEntry(ne))
  -      {
  -         if (log.isTraceEnabled())
  -         {
  -            log.trace("Queue already contains " + ne.getFqn() + " processing it as visited");
  -         }
  -         this.processVisitedNodes(ne.getFqn());
  -         return;
  -      }
  +//      if (evictionQueue.containsNodeEntry(ne))
  +//      {
  +//         if (log.isTraceEnabled())
  +//         {
  +//            log.trace("Queue already contains " + ne.getFqn() + " processing it as visited");
  +//         }
  +//         this.processVisitedNodes(ne.getFqn());
  +//         return;
  +//      }
   
         evictionQueue.addNodeEntry(ne);
   
  
  
  



More information about the jboss-cvs-commits mailing list