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

Manik Surtani msurtani at jboss.com
Thu Jul 20 05:03:51 EDT 2006


  User: msurtani
  Date: 06/07/20 05:03:51

  Modified:    src/org/jboss/cache/interceptors    
                        InvalidationInterceptor.java
                        OptimisticReplicationInterceptor.java
                        ReplicationInterceptor.java TxInterceptor.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.21      +1 -1      JBossCache/src/org/jboss/cache/interceptors/InvalidationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InvalidationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/InvalidationInterceptor.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -b -r1.20 -r1.21
  --- InvalidationInterceptor.java	19 Jul 2006 21:34:43 -0000	1.20
  +++ InvalidationInterceptor.java	20 Jul 2006 09:03:51 -0000	1.21
  @@ -152,7 +152,7 @@
   
           if (log.isDebugEnabled()) log.debug("Cache ["+cache.getLocalAddress()+"] replicating " + call);
           // voila, invalidated!
  -        replicateCall(call, configuration.getCacheModeInt() == Configuration.CacheMode.INVALIDATION_SYNC);
  +        replicateCall(call, configuration.getCacheMode() == Configuration.CacheMode.INVALIDATION_SYNC);
       }
   
       protected void invalidateModifications(List<MethodCall> modifications, TransactionWorkspace workspace) throws Throwable
  
  
  
  1.23      +1 -1      JBossCache/src/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticReplicationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- OptimisticReplicationInterceptor.java	19 Jul 2006 21:34:43 -0000	1.22
  +++ OptimisticReplicationInterceptor.java	20 Jul 2006 09:03:51 -0000	1.23
  @@ -140,7 +140,7 @@
   
       protected Object broadcastPrepare(JBCMethodCall methodCall, GlobalTransaction gtx) throws Throwable
       {
  -        boolean remoteCallSync = configuration.getCacheModeInt() == Configuration.CacheMode.REPL_SYNC;
  +        boolean remoteCallSync = configuration.getCacheMode() == Configuration.CacheMode.REPL_SYNC;
   
           Object[] args = methodCall.getArgs();
           List modifications = (List) args[1];
  
  
  
  1.34      +4 -4      JBossCache/src/org/jboss/cache/interceptors/ReplicationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/ReplicationInterceptor.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -b -r1.33 -r1.34
  --- ReplicationInterceptor.java	19 Jul 2006 21:34:43 -0000	1.33
  +++ ReplicationInterceptor.java	20 Jul 2006 09:03:51 -0000	1.34
  @@ -16,7 +16,7 @@
    * 'side-ways' (see docs/design/Refactoring.txt).
    *
    * @author Bela Ban
  - * @version $Id: ReplicationInterceptor.java,v 1.33 2006/07/19 21:34:43 msurtani Exp $
  + * @version $Id: ReplicationInterceptor.java,v 1.34 2006/07/20 09:03:51 msurtani Exp $
    */
   public class ReplicationInterceptor extends BaseRpcInterceptor
   {
  @@ -80,7 +80,7 @@
               if (ctx.isOriginLocal())
               {
                   // don't re-broadcast if we've received this from anotehr cache in the cluster.
  -                handleReplicatedMethod(m, configuration.getCacheModeInt());
  +                handleReplicatedMethod(m, configuration.getCacheMode());
               }
           }
           else
  @@ -104,7 +104,7 @@
           if (log.isTraceEnabled())
           {
               log.trace("invoking method " + m + ", members=" + cache.getMembers() + ", mode=" +
  -                    configuration.getCacheModeInt() + ", exclude_self=" + true + ", timeout=" +
  +                    configuration.getCacheMode() + ", exclude_self=" + true + ", timeout=" +
                       configuration.getSyncReplTimeout());
           }
           switch (mode)
  @@ -137,7 +137,7 @@
        */
       protected void runPreparePhase(JBCMethodCall prepareMethod, GlobalTransaction gtx) throws Throwable
       {
  -        boolean async = configuration.getCacheModeInt() == Configuration.CacheMode.REPL_ASYNC;
  +        boolean async = configuration.getCacheMode() == Configuration.CacheMode.REPL_ASYNC;
           if (log.isTraceEnabled())
           {
               log.trace("(" + cache.getLocalAddress() + "): running remote prepare for global tx " + gtx + " with async mode=" + async);
  
  
  
  1.52      +4 -5      JBossCache/src/org/jboss/cache/interceptors/TxInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TxInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/TxInterceptor.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -b -r1.51 -r1.52
  --- TxInterceptor.java	19 Jul 2006 21:34:43 -0000	1.51
  +++ TxInterceptor.java	20 Jul 2006 09:03:51 -0000	1.52
  @@ -8,16 +8,15 @@
   
   import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
   import org.jboss.cache.CacheException;
  +import org.jboss.cache.CacheSPI;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.InvocationContext;
   import org.jboss.cache.OptimisticTransactionEntry;
   import org.jboss.cache.ReplicationException;
   import org.jboss.cache.TransactionEntry;
   import org.jboss.cache.TransactionTable;
  -import org.jboss.cache.TreeCache;
  -import org.jboss.cache.CacheSPI;
  -import org.jboss.cache.config.Option;
   import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.config.Option;
   import org.jboss.cache.marshall.JBCMethodCall;
   import org.jboss.cache.marshall.MethodCallFactory;
   import org.jboss.cache.marshall.MethodDeclarations;
  @@ -777,7 +776,7 @@
                   prepareMethod = MethodCallFactory.create(MethodDeclarations.optimisticPrepareMethod, new Object[]{
                           gtx, modifications, null, (Address) cache.getLocalAddress(), Boolean.FALSE});
               }
  -            else if(configuration.getCacheModeInt() != Configuration.CacheMode.REPL_ASYNC)
  +            else if(configuration.getCacheMode() != Configuration.CacheMode.REPL_ASYNC)
               {
                   prepareMethod = MethodCallFactory.create(MethodDeclarations.prepareMethod,
                           new Object[]{gtx, modifications, (Address) cache.getLocalAddress(),
  @@ -1003,7 +1002,7 @@
   
   
                           // if this is optimistic or sync repl
  -                        boolean onePhaseCommit = !configuration.isNodeLockingOptimistic() && configuration.getCacheModeInt() == Configuration.CacheMode.REPL_ASYNC;
  +                        boolean onePhaseCommit = !configuration.isNodeLockingOptimistic() && configuration.getCacheMode() == Configuration.CacheMode.REPL_ASYNC;
                           if (log.isDebugEnabled()) log.debug("Running commit phase.  One phase? " + onePhaseCommit);
                           runCommitPhase(gtx, tx, modifications, onePhaseCommit);
                           log.debug("Finished commit phase");
  
  
  



More information about the jboss-cvs-commits mailing list