[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/passivation ...

Manik Surtani msurtani at jboss.com
Tue Jul 18 06:50:47 EDT 2006


  User: msurtani
  Date: 06/07/18 06:50:47

  Modified:    tests/functional/org/jboss/cache/passivation  
                        BasicPassivationTest.java
                        LocalPassivationIntegrationTest.java
  Log:
  Checked in new Habanero interfaces
  Updated codebase to deal with new interfaces
  
  Revision  Changes    Path
  1.3       +7 -7      JBossCache/tests/functional/org/jboss/cache/passivation/BasicPassivationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BasicPassivationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/BasicPassivationTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- BasicPassivationTest.java	21 Jun 2006 11:10:59 -0000	1.2
  +++ BasicPassivationTest.java	18 Jul 2006 10:50:47 -0000	1.3
  @@ -13,14 +13,14 @@
   import org.jboss.cache.TreeCache;
   import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.AbstractTreeCacheListener;
  -import org.jboss.cache.TreeCacheListener;
  +import org.jboss.cache.CacheListener;
  +import org.jboss.cache.AbstractCacheListener;
   import org.jboss.cache.misc.TestingUtil;
   
   /**
    *
    * @author Ben Wang
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class BasicPassivationTest extends TestCase
   {
  @@ -58,7 +58,7 @@
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache_, "META-INF/local-passivation-service.xml"); // read in generic local xml
         cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  -      TreeCacheListener listener = new TestCacheListener();
  +      CacheListener listener = new TestCacheListener();
         cache_.addTreeCacheListener(listener);
         cache_.startService();
      }
  @@ -117,9 +117,9 @@
         junit.textui.TestRunner.run(org.jboss.cache.passivation.BasicPassivationTest.suite());
      }
   
  -   public class TestCacheListener extends AbstractTreeCacheListener
  +   public class TestCacheListener extends AbstractCacheListener
      {
  -      public void nodeActivate(Fqn fqn, boolean pre) {
  +      public void nodeActivated(Fqn fqn, boolean pre) {
            if(pre) return;  // we are not interested in postActivate event
            if(!fqn.isChildOrEquals(Fqn.fromString(FQNSTR))) return;  // don't care about fqn that doesn't belong to me.
   
  @@ -127,7 +127,7 @@
            activationCount++;
         }
   
  -      public void nodePassivate(Fqn fqn, boolean pre) {
  +      public void nodePassivated(Fqn fqn, boolean pre) {
            if(!pre) return;  // we are not interested in postPassivate event
            if(!fqn.isChildOrEquals(Fqn.fromString(FQNSTR))) return;  // don't care about fqn that doesn't belong to me.
   
  
  
  
  1.3       +8 -61     JBossCache/tests/functional/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocalPassivationIntegrationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- LocalPassivationIntegrationTest.java	21 Jun 2006 11:10:59 -0000	1.2
  +++ LocalPassivationIntegrationTest.java	18 Jul 2006 10:50:47 -0000	1.3
  @@ -8,15 +8,13 @@
   package org.jboss.cache.passivation;
   
   import junit.framework.TestCase;
  -import org.jboss.cache.TreeCache;
  -import org.jboss.cache.TreeCacheListener;
  -import org.jboss.cache.PropertyConfigurator;
  -import org.jboss.cache.Fqn;
  -import org.jboss.cache.ExtendedTreeCacheListener;
  -import org.jboss.cache.misc.TestingUtil;
  -import org.jgroups.View;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.jboss.cache.AbstractCacheListener;
  +import org.jboss.cache.Fqn;
  +import org.jboss.cache.PropertyConfigurator;
  +import org.jboss.cache.TreeCache;
  +import org.jboss.cache.misc.TestingUtil;
   
   /**
    * @author Ben Wang, Feb 11, 2004
  @@ -40,7 +38,7 @@
         cache_ = new TreeCache();
         initCaches(cache_);
         cache_.setUseMarshalling(true);
  -      cache_.addTreeCacheListener((TreeCacheListener)listener_);
  +      cache_.addTreeCacheListener(listener_);
         listener_.resetCounter();
   
         cache_.startService();
  @@ -86,7 +84,7 @@
         System.out.println("-- " + msg);
      }
   
  -   class PassivationListener implements ExtendedTreeCacheListener, TreeCacheListener
  +   class PassivationListener extends AbstractCacheListener
      {
         int counter = 0;
   
  @@ -98,18 +96,7 @@
            counter = 0;
         }
   
  -      public void nodeEvict(Fqn fqn, boolean pre) {
  -      }
  -
  -      public void nodeRemove(Fqn fqn, boolean pre, boolean isLocal) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeModify(Fqn fqn, boolean pre, boolean isLocal) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeActivate(Fqn fqn, boolean pre) {
  +      public void nodeActivated(Fqn fqn, boolean pre) {
            if(!pre)
            {
               counter++;
  @@ -117,45 +104,5 @@
            }
         }
   
  -      public void nodePassivate(Fqn fqn, boolean pre) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeCreated(Fqn fqn) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeRemoved(Fqn fqn) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeLoaded(Fqn fqn) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeEvicted(Fqn fqn) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeModified(Fqn fqn) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void nodeVisited(Fqn fqn) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void cacheStarted(TreeCache cache) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void cacheStopped(TreeCache cache) {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
  -
  -      public void viewChange(View new_view)  // might be MergeView after merging
  -      {
  -         //To change body of implemented methods use File | Settings | File Templates.
  -      }
      }
   }
  
  
  



More information about the jboss-cvs-commits mailing list