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

Manik Surtani manik at jboss.org
Fri Jun 8 11:39:28 EDT 2007


  User: msurtani
  Date: 07/06/08 11:39:28

  Modified:    src/org/jboss/cache/interceptors     
                        OptimisticCreateIfNotExistsInterceptor.java
                        OptimisticNodeInterceptor.java
                        CreateIfNotExistsInterceptor.java
                        CacheLoaderInterceptor.java
                        ActivationInterceptor.java
  Log:
  JBCACHE-1022
  
  Revision  Changes    Path
  1.49      +2 -2      JBossCache/src/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticCreateIfNotExistsInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -b -r1.48 -r1.49
  --- OptimisticCreateIfNotExistsInterceptor.java	23 May 2007 15:22:03 -0000	1.48
  +++ OptimisticCreateIfNotExistsInterceptor.java	8 Jun 2007 15:39:28 -0000	1.49
  @@ -235,8 +235,8 @@
               Notifier n = cache.getNotifier();
               for (Fqn temp : nodesCreated)
               {
  -               n.notifyNodeCreated(temp, true, ctx, false);
  -               n.notifyNodeCreated(temp, false, ctx, false);
  +               n.notifyNodeCreated(temp, true, ctx);
  +               n.notifyNodeCreated(temp, false, ctx);
                  if (trace) log.trace("Notifying cache of node created in workspace " + temp);
               }
            }
  
  
  
  1.65      +20 -20    JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticNodeInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -b -r1.64 -r1.65
  --- OptimisticNodeInterceptor.java	23 May 2007 15:22:03 -0000	1.64
  +++ OptimisticNodeInterceptor.java	8 Jun 2007 15:39:28 -0000	1.65
  @@ -246,14 +246,14 @@
         Fqn nodeNewFqn = new Fqn(parent.getFqn(), nodeFqn.getLastElement());
   
         // pre-notify
  -      notifier.notifyNodeMoved(nodeFqn, nodeNewFqn, true, ctx, false);
  +      notifier.notifyNodeMoved(nodeFqn, nodeNewFqn, true, ctx);
         recursiveMoveNode(node, parent.getFqn(), ws);
   
         // remove old nodes. this may mark some nodes which have already been moved as deleted
         removeNode(ws, node, false, ctx);
   
         // post-notify
  -      notifier.notifyNodeMoved(nodeFqn, nodeNewFqn, false, ctx, false);
  +      notifier.notifyNodeMoved(nodeFqn, nodeNewFqn, false, ctx);
      }
   
      /**
  @@ -282,12 +282,12 @@
         if (workspaceNode == null)
            throw new NodeNotExistsException("optimisticCreateIfNotExistsInterceptor should have created this node!");
         // pre-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.PUT_MAP, workspaceNode.getData(), ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.PUT_MAP, workspaceNode.getData(), ctx);
         if (eraseExisitng) workspaceNode.clearData();
         workspaceNode.putAll(data);
         workspace.addNode(workspaceNode);
         // post-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.PUT_MAP, workspaceNode.getData(), ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.PUT_MAP, workspaceNode.getData(), ctx);
      }
   
      private Object putDataKeyValueAndNotify(Object key, Object value, TransactionWorkspace workspace, WorkspaceNode workspaceNode, InvocationContext ctx)
  @@ -297,13 +297,13 @@
   
         Map addedData = Collections.singletonMap(key, value);
         // pre-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.PUT_DATA, workspaceNode.getData(), ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.PUT_DATA, workspaceNode.getData(), ctx);
   
         Object old = workspaceNode.put(key, value);
         workspace.addNode(workspaceNode);
   
         // post-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.PUT_DATA, addedData, ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.PUT_DATA, addedData, ctx);
   
         return old;
      }
  @@ -318,7 +318,7 @@
         if (parentNode == null) throw new NodeNotExistsException("Unable to find parent node with fqn " + parentFqn);
   
         // pre-notify
  -      if (notify) notifier.notifyNodeRemoved(workspaceNode.getFqn(), true, workspaceNode.getData(), ctx, false);
  +      if (notify) notifier.notifyNodeRemoved(workspaceNode.getFqn(), true, workspaceNode.getData(), ctx);
   
         parentNode.removeChild(workspaceNode.getFqn().getLastElement());
   
  @@ -340,7 +340,7 @@
         }
   
         // post-notify
  -      if (notify) notifier.notifyNodeRemoved(workspaceNode.getFqn(), false, null, ctx, false);
  +      if (notify) notifier.notifyNodeRemoved(workspaceNode.getFqn(), false, null, ctx);
         return true;
      }
   
  @@ -349,14 +349,14 @@
         if (workspaceNode == null) return null;
   
         // pre-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.REMOVE_DATA, workspaceNode.getData(), ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.REMOVE_DATA, workspaceNode.getData(), ctx);
   
         Object old = workspaceNode.remove(removeKey);
         workspace.addNode(workspaceNode);
   
         Map removedData = Collections.singletonMap(removeKey, old);
         // post-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.REMOVE_DATA, removedData, ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.REMOVE_DATA, removedData, ctx);
   
         return old;
      }
  @@ -368,13 +368,13 @@
         Map data = new HashMap(workspaceNode.getData());
   
         // pre-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.REMOVE_DATA, data, ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), true, CacheListener.ModificationType.REMOVE_DATA, data, ctx);
   
         workspaceNode.clearData();
         workspace.addNode(workspaceNode);
   
         // post-notify
  -      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.REMOVE_DATA, data, ctx, false);
  +      notifier.notifyNodeModified(workspaceNode.getFqn(), false, CacheListener.ModificationType.REMOVE_DATA, data, ctx);
      }
   
      private Object getValueForKeyAndNotify(Object[] args, TransactionWorkspace workspace, InvocationContext ctx)
  @@ -391,10 +391,10 @@
         else
         {
            //add this node into the wrokspace
  -         notifier.notifyNodeVisited(fqn, true, ctx, false);
  +         notifier.notifyNodeVisited(fqn, true, ctx);
            Object val = workspaceNode.get(key);
            workspace.addNode(workspaceNode);
  -         notifier.notifyNodeVisited(fqn, false, ctx, false);
  +         notifier.notifyNodeVisited(fqn, false, ctx);
            return val;
         }
      }
  @@ -412,9 +412,9 @@
         }
         else
         {
  -         notifier.notifyNodeVisited(fqn, true, ctx, false);
  +         notifier.notifyNodeVisited(fqn, true, ctx);
            workspace.addNode(workspaceNode);
  -         notifier.notifyNodeVisited(fqn, false, ctx, false);
  +         notifier.notifyNodeVisited(fqn, false, ctx);
            return workspaceNode.getNode();
         }
      }
  @@ -432,10 +432,10 @@
         }
         else
         {
  -         notifier.notifyNodeVisited(fqn, true, ctx, false);
  +         notifier.notifyNodeVisited(fqn, true, ctx);
            Object keySet = workspaceNode.getKeys();
            workspace.addNode(workspaceNode);
  -         notifier.notifyNodeVisited(fqn, false, ctx, false);
  +         notifier.notifyNodeVisited(fqn, false, ctx);
            return keySet;
         }
      }
  @@ -453,10 +453,10 @@
         }
         else
         {
  -         notifier.notifyNodeVisited(fqn, true, ctx, false);
  +         notifier.notifyNodeVisited(fqn, true, ctx);
            Object nameSet = workspaceNode.getChildrenNames();
            workspace.addNode(workspaceNode);
  -         notifier.notifyNodeVisited(fqn, false, ctx, false);
  +         notifier.notifyNodeVisited(fqn, false, ctx);
            return nameSet;
         }
      }
  
  
  
  1.29      +3 -3      JBossCache/src/org/jboss/cache/interceptors/CreateIfNotExistsInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CreateIfNotExistsInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CreateIfNotExistsInterceptor.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- CreateIfNotExistsInterceptor.java	6 Jun 2007 12:43:48 -0000	1.28
  +++ CreateIfNotExistsInterceptor.java	8 Jun 2007 15:39:28 -0000	1.29
  @@ -20,7 +20,7 @@
    * (depending on the create_if_not_exists argument)
    *
    * @author Bela Ban
  - * @version $Id: CreateIfNotExistsInterceptor.java,v 1.28 2007/06/06 12:43:48 msurtani Exp $
  + * @version $Id: CreateIfNotExistsInterceptor.java,v 1.29 2007/06/08 15:39:28 msurtani Exp $
    * @deprecated This code is not used anymore and will be removed in a future unlock
    */
   @Deprecated
  @@ -409,8 +409,8 @@
                     // (needed for abort/rollback of transaction)
                     // cache.addNode(tx, (Fqn)tmp_fqn.clone());
                  }
  -               cache.getNotifier().notifyNodeCreated(tmp_fqn, true, ctx, true);
  -               cache.getNotifier().notifyNodeCreated(tmp_fqn, false, ctx, true);
  +               cache.getNotifier().notifyNodeCreated(tmp_fqn, true, ctx);
  +               cache.getNotifier().notifyNodeCreated(tmp_fqn, false, ctx);
               }
               n = child_node;
            }
  
  
  
  1.82      +5 -5      JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheLoaderInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -b -r1.81 -r1.82
  --- CacheLoaderInterceptor.java	30 May 2007 11:35:14 -0000	1.81
  +++ CacheLoaderInterceptor.java	8 Jun 2007 15:39:28 -0000	1.82
  @@ -24,7 +24,7 @@
    * Loads nodes that don't exist at the time of the call into memory from the CacheLoader
    *
    * @author Bela Ban
  - * @version $Id: CacheLoaderInterceptor.java,v 1.81 2007/05/30 11:35:14 msurtani Exp $
  + * @version $Id: CacheLoaderInterceptor.java,v 1.82 2007/06/08 15:39:28 msurtani Exp $
    */
   public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
   {
  @@ -394,20 +394,20 @@
         {
            log.trace("Node data is not null, loading");
   
  -         cache.getNotifier().notifyNodeLoaded(fqn, true, Collections.emptyMap(), ctx, true);
  +         cache.getNotifier().notifyNodeLoaded(fqn, true, Collections.emptyMap(), ctx);
            if (isActivation)
            {
  -            cache.getNotifier().notifyNodeActivated(fqn, true, Collections.emptyMap(), ctx, true);
  +            cache.getNotifier().notifyNodeActivated(fqn, true, Collections.emptyMap(), ctx);
            }
   
            n = createNodes(fqn, entry);
   //         n.clearDataDirect();
            n.putAllDirect(nodeData);
   
  -         cache.getNotifier().notifyNodeLoaded(fqn, false, nodeData, ctx, true);
  +         cache.getNotifier().notifyNodeLoaded(fqn, false, nodeData, ctx);
            if (isActivation)
            {
  -            cache.getNotifier().notifyNodeActivated(fqn, false, nodeData, ctx, true);
  +            cache.getNotifier().notifyNodeActivated(fqn, false, nodeData, ctx);
            }
         }
   
  
  
  
  1.57      +3 -3      JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ActivationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -b -r1.56 -r1.57
  --- ActivationInterceptor.java	30 May 2007 11:52:48 -0000	1.56
  +++ ActivationInterceptor.java	8 Jun 2007 15:39:28 -0000	1.57
  @@ -27,7 +27,7 @@
    * their attributes have been initialized and their children have been loaded in memory.
    *
    * @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
  - * @version $Id: ActivationInterceptor.java,v 1.56 2007/05/30 11:52:48 msurtani Exp $
  + * @version $Id: ActivationInterceptor.java,v 1.57 2007/06/08 15:39:28 msurtani Exp $
    */
   public class ActivationInterceptor extends CacheLoaderInterceptor implements ActivationInterceptorMBean
   {
  @@ -186,7 +186,7 @@
   
      private void remove(InvocationContext ctx, Fqn fqn) throws Exception
      {
  -      cache.getNotifier().notifyNodeActivated(fqn, true, Collections.emptyMap(), ctx, true);
  +      cache.getNotifier().notifyNodeActivated(fqn, true, Collections.emptyMap(), ctx);
         loader.remove(fqn);
         if (configuration.getExposeManagementStatistics() && getStatisticsEnabled())
         {
  @@ -347,7 +347,7 @@
      {
         Modification mod = new Modification(Modification.ModificationType.REMOVE_NODE, fqn);
         l.add(mod);
  -      cache.getNotifier().notifyNodeActivated(fqn, false, data, ctx, true);
  +      cache.getNotifier().notifyNodeActivated(fqn, false, data, ctx);
      }
   
   }
  
  
  



More information about the jboss-cvs-commits mailing list