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

Manik Surtani msurtani at jboss.com
Thu Jan 4 00:35:39 EST 2007


  User: msurtani
  Date: 07/01/04 00:35:39

  Modified:    src/org/jboss/cache/eviction  BaseEvictionPolicy.java
  Log:
  Major changes around nodes, and the way they interact with the interceptor stack.
  Also removed redundant methods in NodeSPI and removed the need for casting to NodeSPI in most cases.
  
  Revision  Changes    Path
  1.7       +7 -4      JBossCache/src/org/jboss/cache/eviction/BaseEvictionPolicy.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BaseEvictionPolicy.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/eviction/BaseEvictionPolicy.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- BaseEvictionPolicy.java	30 Dec 2006 17:50:05 -0000	1.6
  +++ BaseEvictionPolicy.java	4 Jan 2007 05:35:39 -0000	1.7
  @@ -3,7 +3,7 @@
   import org.jboss.cache.CacheException;
   import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.Node;
  +import org.jboss.cache.NodeSPI;
   
   import java.util.Set;
   
  @@ -12,7 +12,7 @@
    *
    * @author Ben Wang  2-2004
    * @author Daniel Huang - dhuang at jboss.org
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    */
   public abstract class BaseEvictionPolicy implements EvictionPolicy
   {
  @@ -63,10 +63,13 @@
      {
         try
         {
  -         Node n = cache_.peek(fqn);
  +         NodeSPI n = cache_.peek(fqn);
            if (n == null)
  +         {
               return null;
  -         return n.get(key);
  +         }
  +
  +         return n.getDirect(key);
         }
         catch (CacheException e)
         {
  
  
  



More information about the jboss-cvs-commits mailing list