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

Manik Surtani msurtani at jboss.com
Sat Dec 30 12:50:05 EST 2006


  User: msurtani
  Date: 06/12/30 12:50:05

  Modified:    src/org/jboss/cache/eviction    LRUPolicy.java
                        BaseEvictionPolicy.java EvictionPolicy.java
  Log:
  Major changes to restructure cache and node object model
  
  Revision  Changes    Path
  1.12      +3 -3      JBossCache/src/org/jboss/cache/eviction/LRUPolicy.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LRUPolicy.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/eviction/LRUPolicy.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- LRUPolicy.java	14 Nov 2006 14:17:11 -0000	1.11
  +++ LRUPolicy.java	30 Dec 2006 17:50:05 -0000	1.12
  @@ -7,7 +7,7 @@
    */
   package org.jboss.cache.eviction;
   
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.RegionManager;
   
   /**
  @@ -16,7 +16,7 @@
    *
    * @author Ben Wang 02-2004
    * @author Daniel Huang - dhuang at jboss.org
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
    */
   public class LRUPolicy extends BaseEvictionPolicy implements EvictionPolicy
   {
  @@ -40,7 +40,7 @@
         return LRUConfiguration.class;
      }
   
  -   public void configure(TreeCache cache)
  +   public void configure(CacheImpl cache)
      {
         super.configure(cache);
         regionManager_ = cache_.getRegionManager();
  
  
  
  1.6       +7 -6      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.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- BaseEvictionPolicy.java	27 Nov 2006 04:49:46 -0000	1.5
  +++ BaseEvictionPolicy.java	30 Dec 2006 17:50:05 -0000	1.6
  @@ -1,9 +1,9 @@
   package org.jboss.cache.eviction;
   
   import org.jboss.cache.CacheException;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.Node;
  -import org.jboss.cache.TreeCache;
   
   import java.util.Set;
   
  @@ -12,11 +12,11 @@
    *
    * @author Ben Wang  2-2004
    * @author Daniel Huang - dhuang at jboss.org
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public abstract class BaseEvictionPolicy implements EvictionPolicy
   {
  -   protected TreeCache cache_;
  +   protected CacheImpl cache_;
   
      public BaseEvictionPolicy()
      {
  @@ -74,7 +74,7 @@
         }
      }
   
  -   public void configure(TreeCache cache)
  +   public void configure(CacheImpl cache)
      {
         this.cache_ = cache;
      }
  @@ -84,7 +84,8 @@
       * @see org.jboss.cache.eviction.EvictionPolicy#canIgnoreEvent(org.jboss.cache.Fqn)
       * 
       */
  -   public boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType) {
  +   public boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType)
  +   {
          return false;
      }
   }
  
  
  
  1.9       +8 -9      JBossCache/src/org/jboss/cache/eviction/EvictionPolicy.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EvictionPolicy.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/eviction/EvictionPolicy.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- EvictionPolicy.java	27 Nov 2006 04:49:46 -0000	1.8
  +++ EvictionPolicy.java	30 Dec 2006 17:50:05 -0000	1.9
  @@ -6,8 +6,8 @@
    */
   package org.jboss.cache.eviction;
   
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.TreeCache;
   
   import java.util.Set;
   
  @@ -51,7 +51,7 @@
      /**
       * Method called to configure this implementation.
       */
  -   void configure(TreeCache cache);
  +   void configure(CacheImpl cache);
   
      /**
       * Get the associated EvictionAlgorithm used by the EvictionPolicy.
  @@ -72,28 +72,27 @@
      /**
       * This method will be invoked prior to an event being processed for a node
       * with the specified Fqn.
  -    * <p>
  +    * <p/>
       * This method provides a way to optimize the performance of eviction by 
       * signalling that the node associated with the specified Fqn should not be
       * subject to normal eviction processing.  It can also be used to filter
       * out certain {@link NodeEventType event types} in which the particular
       * eviction algorithm has no interest.
       * </p>
  -    * <p>
  +    * <p/>
       * If this method returns false then the event is processed normally
       * and eviction processing for the node continues. As a result, the event
       * will be added to the {@link org.jboss.cache.Region eviction region's} event queue where
       * at some later point the particular algorithm of the eviction policy
       * can use it to decide whether to call {@link #evict(Fqn)}.
       * </p>
  -    * <p>
  +    * <p/>
       * If this method returns true, then the event is ignored and will not factor
       * in any subsequent eviction processing.
       * </p>
       * 
       * @param fqn The Fqn of the node associated with the event.
       * @param eventType the type of the event
  -    * 
       * @return <code>true</code> to ignore events of this type for this Fqn,
       *         <code>false</code> to process events normally.
       */
  
  
  



More information about the jboss-cvs-commits mailing list