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

Manik Surtani msurtani at jboss.com
Fri Aug 25 10:10:09 EDT 2006


  User: msurtani
  Date: 06/08/25 10:10:09

  Modified:    src/org/jboss/cache          CacheSPI.java
                        GlobalTransaction.java NodeImpl.java
                        RPCManager.java ReplicationQueue.java
                        TransactionEntry.java TransactionTable.java
                        TreeCache.java TreeCacheProxyImpl.java
  Log:
  More work on JBCACHE-734
  
  Revision  Changes    Path
  1.11      +3 -3      JBossCache/src/org/jboss/cache/CacheSPI.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheSPI.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheSPI.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- CacheSPI.java	22 Aug 2006 12:27:51 -0000	1.10
  +++ CacheSPI.java	25 Aug 2006 14:10:09 -0000	1.11
  @@ -12,10 +12,10 @@
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.loader.CacheLoader;
   import org.jboss.cache.loader.CacheLoaderManager;
  -import org.jboss.cache.statetransfer.StateTransferManager;
   import org.jboss.cache.notifications.Notifier;
  +import org.jboss.cache.statetransfer.StateTransferManager;
   import org.jgroups.Address;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   
   import javax.management.ObjectName;
   import javax.transaction.TransactionManager;
  @@ -123,7 +123,7 @@
   
       CacheLoaderManager getCacheLoaderManager();
   
  -    void addUndoOperation(GlobalTransaction tx, MethodCall undo_op);
  +    void addUndoOperation(GlobalTransaction tx, MethodCall undoOperation);
   
       RegionManager getEvictionRegionManager();
   
  
  
  
  1.14      +1 -1      JBossCache/src/org/jboss/cache/GlobalTransaction.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: GlobalTransaction.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/GlobalTransaction.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- GlobalTransaction.java	13 Apr 2006 12:02:59 -0000	1.13
  +++ GlobalTransaction.java	25 Aug 2006 14:10:09 -0000	1.14
  @@ -22,7 +22,7 @@
    *
    * @author <a href="mailto:bela at jboss.org">Bela Ban</a> Apr 12, 2003
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
  - * @version $Revision: 1.13 $
  + * @version $Revision: 1.14 $
    */
   public class GlobalTransaction implements Externalizable {
      Address addr=null;
  
  
  
  1.6       +1 -1      JBossCache/src/org/jboss/cache/NodeImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/NodeImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- NodeImpl.java	17 Aug 2006 17:34:59 -0000	1.5
  +++ NodeImpl.java	25 Aug 2006 14:10:09 -0000	1.6
  @@ -17,7 +17,7 @@
   import org.jboss.cache.lock.UpgradeException;
   import org.jboss.cache.marshall.MethodCallFactory;
   import org.jboss.cache.marshall.MethodDeclarations;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   
   import java.io.Externalizable;
   import java.io.IOException;
  
  
  
  1.3       +2 -2      JBossCache/src/org/jboss/cache/RPCManager.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RPCManager.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/RPCManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- RPCManager.java	19 Jul 2006 21:34:45 -0000	1.2
  +++ RPCManager.java	25 Aug 2006 14:10:09 -0000	1.3
  @@ -7,10 +7,10 @@
   package org.jboss.cache;
   
   import org.jgroups.Address;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   
  -import java.util.List;
   import java.lang.reflect.Method;
  +import java.util.List;
   
   /**
    * Manager that handles all RPC calls between JBoss Cache instances
  
  
  
  1.11      +2 -2      JBossCache/src/org/jboss/cache/ReplicationQueue.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicationQueue.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/ReplicationQueue.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- ReplicationQueue.java	26 May 2006 12:58:57 -0000	1.10
  +++ ReplicationQueue.java	25 Aug 2006 14:10:09 -0000	1.11
  @@ -10,7 +10,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.marshall.MethodDeclarations;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   
   import java.util.ArrayList;
   import java.util.List;
  @@ -22,7 +22,7 @@
    * Periodically (or when certain size is exceeded) takes elements and replicates them.
    *
    * @author <a href="mailto:bela at jboss.org">Bela Ban</a> May 24, 2003
  - * @version $Revision: 1.10 $
  + * @version $Revision: 1.11 $
    */
   public class ReplicationQueue {
   
  
  
  
  1.12      +9 -10     JBossCache/src/org/jboss/cache/TransactionEntry.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TransactionEntry.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TransactionEntry.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- TransactionEntry.java	25 Aug 2006 12:41:35 -0000	1.11
  +++ TransactionEntry.java	25 Aug 2006 14:10:09 -0000	1.12
  @@ -9,8 +9,7 @@
   
   import org.jboss.cache.lock.IdentityLock;
   import org.jboss.cache.config.Option;
  -import org.jboss.cache.marshall.JBCMethodCall;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -32,7 +31,7 @@
    * </ul>
    *
    * @author <a href="mailto:bela at jboss.org">Bela Ban</a> Apr 14, 2003
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
    */
   public class TransactionEntry {
   
  @@ -47,11 +46,11 @@
      /**
       * List<MethodCall> of modifications ({@link MethodCall}). They will be replicated on TX commit
       */
  -   protected List<JBCMethodCall> modification_list=new LinkedList<JBCMethodCall>();
  -   protected List<JBCMethodCall> cl_mod_list = new LinkedList<JBCMethodCall>();
  +   protected List<MethodCall> modification_list=new LinkedList<MethodCall>();
  +   protected List<MethodCall> cl_mod_list = new LinkedList<MethodCall>();
   
      /**
  -    * List<MethodCall>. List of compensating {@link org.jgroups.blocks.MethodCall} objects
  +    * List<MethodCall>. List of compensating {@link org.jboss.cache.marshall.MethodCall} objects
       * which revert the ones in <tt>modification_list</tt>. For each entry in the modification list,
       * we have a corresponding entry in this list. A rollback will simply iterate over this list in
       * reverse to undo the modifications. Note that these undo-ops will never be replicated.
  @@ -78,12 +77,12 @@
      /**
       * Adds a modification to the modification list.
       */
  -   public void addModification(JBCMethodCall m) {
  +   public void addModification(MethodCall m) {
         if (m == null) return;
         modification_list.add(m);
      }
   
  -    public void addCacheLoaderModification(JBCMethodCall m)
  +    public void addCacheLoaderModification(MethodCall m)
       {
           if (m!=null) cl_mod_list.add(m);
       }
  @@ -92,11 +91,11 @@
      /**
       * Returns all modifications.
       */
  -   public List<JBCMethodCall> getModifications() {
  +   public List<MethodCall> getModifications() {
         return modification_list;
      }
   
  -   public List<JBCMethodCall> getCacheLoaderModifications()
  +   public List<MethodCall> getCacheLoaderModifications()
      {
          return cl_mod_list;
      }
  
  
  
  1.9       +4 -5      JBossCache/src/org/jboss/cache/TransactionTable.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TransactionTable.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TransactionTable.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- TransactionTable.java	25 Aug 2006 12:41:35 -0000	1.8
  +++ TransactionTable.java	25 Aug 2006 14:10:09 -0000	1.9
  @@ -11,8 +11,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.lock.IdentityLock;
  -import org.jboss.cache.marshall.JBCMethodCall;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   
   import javax.transaction.Transaction;
   import java.util.Collection;
  @@ -26,7 +25,7 @@
    * given TX.
    *
    * @author <a href="mailto:bela at jboss.org">Bela Ban</a> Apr 14, 2003
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public class TransactionTable {
   
  @@ -146,7 +145,7 @@
      /**
       * Adds a motification to the global transaction.
       */
  -   public void addModification(GlobalTransaction gtx, JBCMethodCall m) {
  +   public void addModification(GlobalTransaction gtx, MethodCall m) {
         TransactionEntry entry=get(gtx);
         if(entry == null) {
            log.error("transaction not found (gtx=" + gtx + ")");
  @@ -155,7 +154,7 @@
         entry.addModification(m);
      }
   
  -    public void addCacheLoaderModification(GlobalTransaction gtx, JBCMethodCall m)
  +    public void addCacheLoaderModification(GlobalTransaction gtx, MethodCall m)
       {
           TransactionEntry entry = get(gtx);
           if(entry == null) {
  
  
  
  1.229     +12 -13    JBossCache/src/org/jboss/cache/TreeCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
  retrieving revision 1.228
  retrieving revision 1.229
  diff -u -b -r1.228 -r1.229
  --- TreeCache.java	25 Aug 2006 11:59:03 -0000	1.228
  +++ TreeCache.java	25 Aug 2006 14:10:09 -0000	1.229
  @@ -26,7 +26,6 @@
   import org.jboss.cache.lock.LockUtil;
   import org.jboss.cache.lock.LockingException;
   import org.jboss.cache.lock.TimeoutException;
  -import org.jboss.cache.marshall.JBCMethodCall;
   import org.jboss.cache.marshall.MethodCallFactory;
   import org.jboss.cache.marshall.MethodDeclarations;
   import org.jboss.cache.marshall.Region;
  @@ -43,7 +42,7 @@
   import org.jboss.system.ServiceMBeanSupport;
   import org.jgroups.*;
   import org.jgroups.blocks.GroupRequest;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   import org.jgroups.blocks.RpcDispatcher;
   import org.jgroups.stack.IpAddress;
   import org.jgroups.util.Rsp;
  @@ -76,7 +75,7 @@
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
    * @author Brian Stansberry
    * @author Daniel Huang (dhuang at jboss.org)
  - * @version $Id: TreeCache.java,v 1.228 2006/08/25 11:59:03 msurtani Exp $
  + * @version $Id: TreeCache.java,v 1.229 2006/08/25 14:10:09 msurtani Exp $
    *          <p/>
    * @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
    */
  @@ -1337,7 +1336,7 @@
      public void _enqueueMethodCall(String subtree, MethodCall call)
         throws Throwable
      {
  -      JBCMethodCall jbcCall = (JBCMethodCall) call;
  +      MethodCall jbcCall = (MethodCall) call;
         Region region = regionManager_.getRegion(subtree);
         if (region == null)
            throw new IllegalStateException("No region found for " + subtree);
  @@ -1361,7 +1360,7 @@
   
                  if (jbcCall.getMethodId() == MethodDeclarations.replicateMethod_id)
                  {
  -                  JBCMethodCall mc = (JBCMethodCall) call.getArgs()[0];
  +                  MethodCall mc = (MethodCall) call.getArgs()[0];
                     if (mc.getMethodId() == MethodDeclarations.getPartialStateMethod_id)
                        return;
                  }
  @@ -1381,16 +1380,16 @@
      private void processQueuedMethodCalls(List queue) throws Throwable
      {
         Map gtxMap = new HashMap();
  -      JBCMethodCall call = null;
  -      JBCMethodCall wrapped = null;
  +      MethodCall call = null;
  +      MethodCall wrapped = null;
         for (Iterator iter = queue.iterator(); iter.hasNext();)
         {
  -         call = (JBCMethodCall) iter.next();
  +         call = (MethodCall) iter.next();
            boolean forgive = false;
            if (call.getMethodId() == MethodDeclarations.replicateMethod_id)
            {
               Object[] args = call.getArgs();
  -            wrapped = (JBCMethodCall) args[0];
  +            wrapped = (MethodCall) args[0];
               switch (wrapped.getMethodId())
               {
                  case MethodDeclarations.prepareMethod_id:
  @@ -3195,7 +3194,7 @@
       */
      public List _clusteredGet(MethodCall methodCall, Boolean searchBackupSubtrees)
      {
  -      JBCMethodCall call = (JBCMethodCall) methodCall;
  +      MethodCall call = (MethodCall) methodCall;
         if (log.isTraceEnabled()) log.trace("Clustered Get called with params: " + call + ", " + searchBackupSubtrees);
         Method m = call.getMethod();
         Object[] args = call.getArgs();
  @@ -3379,7 +3378,7 @@
      /**
       * Returns true if the call results returned a valid result.
       */
  -   private boolean validResult(Object callResults, JBCMethodCall mc, Fqn fqn)
  +   private boolean validResult(Object callResults, MethodCall mc, Fqn fqn)
      {
         switch (mc.getMethodId())
         {
  @@ -3396,7 +3395,7 @@
      /**
       * Creates an empty Collection class based on the return type of the method called.
       */
  -   private Object createEmptyResults(JBCMethodCall mc)
  +   private Object createEmptyResults(MethodCall mc)
      {
         switch (mc.getMethodId())
         {
  
  
  
  1.18      +1 -1      JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheProxyImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- TreeCacheProxyImpl.java	24 Aug 2006 14:57:52 -0000	1.17
  +++ TreeCacheProxyImpl.java	25 Aug 2006 14:10:09 -0000	1.18
  @@ -18,7 +18,7 @@
   import org.jboss.cache.notifications.Notifier;
   import org.jboss.cache.statetransfer.StateTransferManager;
   import org.jgroups.Address;
  -import org.jgroups.blocks.MethodCall;
  +import org.jboss.cache.marshall.MethodCall;
   
   import javax.management.ObjectName;
   import javax.transaction.Transaction;
  
  
  



More information about the jboss-cvs-commits mailing list