[jboss-cvs] JBossCache/docs/TreeCache/en/modules ...

Brian Stansberry brian.stansberry at jboss.com
Wed Oct 11 23:54:45 EDT 2006


  User: bstansberry
  Date: 06/10/11 23:54:45

  Modified:    docs/TreeCache/en/modules  eviction_policies.xml
  Log:
  [JBCACHE-801] Restore EvictionPolicy ability to ignore events based on event type
  
  Revision  Changes    Path
  1.6       +34 -0     JBossCache/docs/TreeCache/en/modules/eviction_policies.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: eviction_policies.xml
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/docs/TreeCache/en/modules/eviction_policies.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- eviction_policies.xml	10 Oct 2006 04:12:27 -0000	1.5
  +++ eviction_policies.xml	12 Oct 2006 03:54:45 -0000	1.6
  @@ -98,6 +98,36 @@
       */
      Class getEvictionConfigurationClass();
   
  +   /**
  +    * This method will be invoked prior to an event being processed for a node
  +    * with the specified Fqn.
  +    * <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>
  +    * 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 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>
  +    * 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.
  +    */
  +   boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType);
  +
   }</programlisting>
   
         <programlisting>public interface EvictionAlgorithm
  @@ -317,6 +347,10 @@
         this.cache_ = cache;
      }
   
  +   public boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType) {
  +       return false;
  +   }
  +
   }</programlisting>
   
         <programlisting>public abstract class BaseEvictionAlgorithm implements EvictionAlgorithm
  
  
  



More information about the jboss-cvs-commits mailing list