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

Manik Surtani msurtani at jboss.com
Thu Oct 19 09:29:57 EDT 2006


  User: msurtani
  Date: 06/10/19 09:29:57

  Modified:    src/org/jboss/cache/notifications  Notifier.java
  Log:
  JBCACHE-790
  
  Revision  Changes    Path
  1.7       +12 -11    JBossCache/src/org/jboss/cache/notifications/Notifier.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Notifier.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/notifications/Notifier.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- Notifier.java	30 Aug 2006 20:03:52 -0000	1.6
  +++ Notifier.java	19 Oct 2006 13:29:57 -0000	1.7
  @@ -13,6 +13,7 @@
   import org.jboss.cache.CacheSPI;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.InvocationContext;
  +import org.jboss.cache.TreeCache;
   import org.jgroups.View;
   
   import java.util.Collections;
  @@ -39,13 +40,13 @@
      private CacheListener evictionPolicyListener;
   
      private Set<CacheListener> listeners = new CopyOnWriteArraySet();
  -   private CacheSPI cache;
  +   private TreeCache treeCache;
      private InvocationContext tempCtx;
      private Log log = LogFactory.getLog(Notifier.class);
   
  -   public Notifier(CacheSPI cache)
  +   public Notifier(TreeCache cache)
      {
  -      this.cache = cache;
  +      this.treeCache = treeCache;
      }
   
      /**
  @@ -114,7 +115,7 @@
      public synchronized void notifyNodeCreated(Fqn fqn, boolean pre)
      {
   
  -      boolean originLocal = cache.getInvocationContext().isOriginLocal();
  +      boolean originLocal = treeCache.getInvocationContext().isOriginLocal();
         resetInvocationContext();
         if (evictionPolicyListener != null)
         {
  @@ -139,7 +140,7 @@
       */
      public synchronized void notifyNodeModified(Fqn fqn, boolean pre, Map data)
      {
  -      boolean originLocal = cache.getInvocationContext().isOriginLocal();
  +      boolean originLocal = treeCache.getInvocationContext().isOriginLocal();
         resetInvocationContext();
         if (evictionPolicyListener != null)
         {
  @@ -164,7 +165,7 @@
       */
      public synchronized void notifyNodeRemoved(Fqn fqn, boolean pre, Map data)
      {
  -      boolean originLocal = cache.getInvocationContext().isOriginLocal();
  +      boolean originLocal = treeCache.getInvocationContext().isOriginLocal();
         resetInvocationContext();
         if (evictionPolicyListener != null)
         {
  @@ -211,7 +212,7 @@
       */
      public synchronized void notifyNodeEvicted(Fqn fqn, boolean pre)
      {
  -      boolean originLocal = cache.getInvocationContext().isOriginLocal();
  +      boolean originLocal = treeCache.getInvocationContext().isOriginLocal();
         resetInvocationContext();
         if (evictionPolicyListener != null)
         {
  @@ -343,20 +344,20 @@
   
      private void restoreInvocationContext()
      {
  -      cache.getInvocationContext().setState(tempCtx);
  +      treeCache.getInvocationContext().setState(tempCtx);
      }
   
      private void resetInvocationContext()
      {
         try
         {
  -         tempCtx = cache.getInvocationContext().clone();
  +         tempCtx = treeCache.getInvocationContext().clone();
         }
         catch (CloneNotSupportedException e)
         {
  -         log.warn("Unable to clone Invocation Context " + cache.getInvocationContext(), e);
  +         log.warn("Unable to clone Invocation Context " + treeCache.getInvocationContext(), e);
         }
  -      cache.getInvocationContext().reset();
  +      treeCache.getInvocationContext().reset();
      }
   
      /**
  
  
  



More information about the jboss-cvs-commits mailing list