[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader ...
Manik Surtani
msurtani at jboss.com
Sat Dec 30 12:49:58 EST 2006
User: msurtani
Date: 06/12/30 12:49:58
Modified: tests/functional/org/jboss/cache/loader
AsyncFileCacheLoaderTest.java
DataSourceIntegrationTest.java
SharedCacheLoaderTest.java
InterceptorSynchronizationTest.java
CacheLoaderMethodCallCounterTest.java
ChainingCacheLoaderFullTest.java
TxCacheLoaderTest.java
LocalDelegatingCacheLoaderTest.java
SingletonStoreCacheLoaderTest.java BdbjeTest.java
ClusteredCacheLoaderTest.java DummyCacheLoader.java
CacheLoaderWithReplicationTest.java
CacheLoaderTestsBase.java
RpcDelegatingCacheLoaderTests.java
CacheLoaderPurgingTest.java
Log:
Major changes to restructure cache and node object model
Revision Changes Path
1.17 +10 -10 JBossCache/tests/functional/org/jboss/cache/loader/AsyncFileCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AsyncFileCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/AsyncFileCacheLoaderTest.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- AsyncFileCacheLoaderTest.java 25 Oct 2006 04:50:19 -0000 1.16
+++ AsyncFileCacheLoaderTest.java 30 Dec 2006 17:49:57 -0000 1.17
@@ -4,13 +4,13 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import org.jboss.cache.CacheException;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.statetransfer.StateTransferManager;
-import org.jboss.util.stream.MarshalledValueOutputStream;
import org.jboss.util.stream.MarshalledValueInputStream;
+import org.jboss.util.stream.MarshalledValueOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -20,7 +20,7 @@
public class AsyncFileCacheLoaderTest extends AbstractCacheLoaderTestBase
{
- private TreeCache cache;
+ private CacheImpl cache;
protected void configureCache() throws Exception
{
@@ -29,7 +29,7 @@
protected void configureCache(String props) throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
// cache.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.jdbm.JdbmCacheLoader",
cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader",
1.10 +3 -3 JBossCache/tests/functional/org/jboss/cache/loader/DataSourceIntegrationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DataSourceIntegrationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/DataSourceIntegrationTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- DataSourceIntegrationTest.java 25 Oct 2006 04:50:19 -0000 1.9
+++ DataSourceIntegrationTest.java 30 Dec 2006 17:49:57 -0000 1.10
@@ -6,7 +6,7 @@
*/
package org.jboss.cache.loader;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.transaction.DummyTransactionManager;
@@ -23,7 +23,7 @@
private String old_factory = null;
private final String FACTORY = "org.jboss.cache.transaction.DummyContextFactory";
private final String JNDI_NAME = "java:/MockDS";
- private TreeCache cache;
+ private CacheImpl cache;
protected void setUp() throws Exception
{
@@ -59,7 +59,7 @@
{
// expected
}
- cache = new TreeCache();
+ cache = new CacheImpl();
cache.getConfiguration().setCacheMode("local");
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(JNDI_NAME));
1.8 +8 -8 JBossCache/tests/functional/org/jboss/cache/loader/SharedCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SharedCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/SharedCacheLoaderTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- SharedCacheLoaderTest.java 25 Oct 2006 04:50:19 -0000 1.7
+++ SharedCacheLoaderTest.java 30 Dec 2006 17:49:57 -0000 1.8
@@ -6,7 +6,7 @@
*/
package org.jboss.cache.loader;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.interceptors.CacheStoreInterceptor;
import org.jboss.cache.interceptors.Interceptor;
@@ -19,16 +19,16 @@
*/
public class SharedCacheLoaderTest extends AbstractCacheLoaderTestBase
{
- private TreeCache cache1, cache2;
+ private CacheImpl cache1, cache2;
private DummyCacheLoader dummyCacheLoader;
protected void setUp() throws Exception
{
if (cache1 != null || cache2 != null) tearDown();
- // set up 2 instances of TreeCache with shared CacheLoaders.
- cache1 = new TreeCache();
- cache2 = new TreeCache();
+ // set up 2 instances of CacheImpl with shared CacheLoaders.
+ cache1 = new CacheImpl();
+ cache2 = new CacheImpl();
cache1.getConfiguration().setCacheMode("REPL_SYNC");
cache2.getConfiguration().setCacheMode("REPL_SYNC");
@@ -44,11 +44,11 @@
cache1.setCacheLoader(dummyCacheLoader);
cache2.setCacheLoader(dummyCacheLoader);
- findCacheStoreInterceptor(cache1).setCache(cache1.getCacheSPI());
- findCacheStoreInterceptor(cache2).setCache(cache2.getCacheSPI());
+ findCacheStoreInterceptor(cache1).setCache(cache1);
+ findCacheStoreInterceptor(cache2).setCache(cache2);
}
- protected CacheStoreInterceptor findCacheStoreInterceptor(TreeCache cache)
+ protected CacheStoreInterceptor findCacheStoreInterceptor(CacheImpl cache)
{
Iterator ints = cache.getInterceptors().iterator();
CacheStoreInterceptor csi = null;
1.6 +6 -6 JBossCache/tests/functional/org/jboss/cache/loader/InterceptorSynchronizationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InterceptorSynchronizationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/InterceptorSynchronizationTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- InterceptorSynchronizationTest.java 23 Oct 2006 05:47:30 -0000 1.5
+++ InterceptorSynchronizationTest.java 30 Dec 2006 17:49:57 -0000 1.6
@@ -2,9 +2,9 @@
import junit.framework.TestCase;
import org.jboss.cache.CacheException;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import java.io.ObjectInputStream;
@@ -18,7 +18,7 @@
import java.util.Set;
/**
- * Test case that proves that the TreeCache is serialized inside the CacheLoaderInterceptor
+ * Test case that proves that the CacheImpl is serialized inside the CacheLoaderInterceptor
* when the node is empty. ANY call to retrieve a node that is not loaded will lock
* up inside CacheLoaderInterceptor while the node is loaded and any other thread
* that wants a node out of the cache will wait for the first one to finish before it can even _start_ loading.
@@ -35,7 +35,7 @@
public void testBlockingProblem() throws Exception
{
- TreeCache cache = new TreeCache();
+ CacheImpl cache = new CacheImpl();
cache.setCacheLoader(new TestSlowCacheLoader());
cache.start();
@@ -220,9 +220,9 @@
private static class Retriever implements Runnable
{
private final String fqn;
- private TreeCache cache;
+ private CacheImpl cache;
- private Retriever(TreeCache cache, String fqn)
+ private Retriever(CacheImpl cache, String fqn)
{
this.fqn = fqn;
this.cache = cache;
1.12 +3 -3 JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderMethodCallCounterTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderMethodCallCounterTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderMethodCallCounterTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- CacheLoaderMethodCallCounterTest.java 25 Oct 2006 04:50:19 -0000 1.11
+++ CacheLoaderMethodCallCounterTest.java 30 Dec 2006 17:49:57 -0000 1.12
@@ -7,7 +7,7 @@
package org.jboss.cache.loader;
import junit.textui.TestRunner;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.CacheImpl;
/**
* A simple non-failing unit test to measure how many times each method on a cache loader is called.
@@ -16,7 +16,7 @@
*/
public class CacheLoaderMethodCallCounterTest extends AbstractCacheLoaderTestBase
{
- private TreeCache cache;
+ private CacheImpl cache;
private DummyCacheLoader dummyLoader;
public static void main(String[] args)
@@ -27,7 +27,7 @@
protected void setUp() throws Exception
{
if (cache != null) tearDown();
- cache = new TreeCache();
+ cache = new CacheImpl();
cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", DummyCacheLoader.class.getName(), "", false, false, false));
cache.start();
dummyLoader = (DummyCacheLoader) cache.getCacheLoader();
1.9 +3 -3 JBossCache/tests/functional/org/jboss/cache/loader/ChainingCacheLoaderFullTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ChainingCacheLoaderFullTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/ChainingCacheLoaderFullTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- ChainingCacheLoaderFullTest.java 25 Oct 2006 04:50:19 -0000 1.8
+++ ChainingCacheLoaderFullTest.java 30 Dec 2006 17:49:57 -0000 1.9
@@ -10,8 +10,8 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.xml.XmlHelper;
@@ -30,7 +30,7 @@
private String loc1 = System.getProperty("java.io.tmpdir", ".") + File.separator + "JBossCache-ChainingCacheLoaderBasicTest-1";
private String loc2 = System.getProperty("java.io.tmpdir", ".") + File.separator + "JBossCache-ChainingCacheLoaderBasicTest-2";
- private TreeCache cache;
+ private CacheImpl cache;
private ChainingCacheLoader chainingCacheLoader;
private CacheLoader loader1, loader2;
private Fqn fqn = Fqn.fromString("/a/b");
@@ -49,7 +49,7 @@
protected void startCache(boolean ignoreMods1, boolean ignoreMods2) throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(loc1, loc2, ignoreMods1, ignoreMods2));
cache.getConfiguration().setCacheMode("local");
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
1.8 +5 -5 JBossCache/tests/functional/org/jboss/cache/loader/TxCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TxCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/TxCacheLoaderTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- TxCacheLoaderTest.java 25 Oct 2006 04:50:19 -0000 1.7
+++ TxCacheLoaderTest.java 30 Dec 2006 17:49:57 -0000 1.8
@@ -2,8 +2,8 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
@@ -16,11 +16,11 @@
/**
* @author Bela Ban
- * @version $Id: TxCacheLoaderTest.java,v 1.7 2006/10/25 04:50:19 bstansberry Exp $
+ * @version $Id: TxCacheLoaderTest.java,v 1.8 2006/12/30 17:49:57 msurtani Exp $
*/
public class TxCacheLoaderTest extends AbstractCacheLoaderTestBase
{
- TreeCache cache1, cache2;
+ CacheImpl cache1, cache2;
private Fqn fqn = Fqn.fromString("/one/two/three");
protected void setUp() throws Exception
@@ -30,7 +30,7 @@
String tmpLoc = System.getProperty("java.io.tmpdir", "/tmp");
String location = tmpLoc + File.separator + "TxCacheLoaderTest1";
- cache1 = new TreeCache();
+ cache1 = new CacheImpl();
cache1.getConfiguration().setCacheMode("repl_sync");
cache1.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
@@ -41,7 +41,7 @@
location = tmpLoc + File.separator + "TxCacheLoaderTest2";
- cache2 = new TreeCache();
+ cache2 = new CacheImpl();
cache2.getConfiguration().setCacheMode("repl_sync");
cache2.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache2.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "location=" + location, false, false, false));
1.15 +6 -5 JBossCache/tests/functional/org/jboss/cache/loader/LocalDelegatingCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LocalDelegatingCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/LocalDelegatingCacheLoaderTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- LocalDelegatingCacheLoaderTest.java 16 Nov 2006 16:18:12 -0000 1.14
+++ LocalDelegatingCacheLoaderTest.java 30 Dec 2006 17:49:57 -0000 1.15
@@ -2,7 +2,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.config.Configuration;
/**
@@ -13,11 +13,11 @@
*/
public class LocalDelegatingCacheLoaderTest extends CacheLoaderTestsBase
{
- TreeCache delegating_cache;
+ CacheImpl delegating_cache;
protected void configureCache() throws Exception
{
- delegating_cache = new TreeCache();
+ delegating_cache = new CacheImpl();
delegating_cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
delegating_cache.create();
delegating_cache.start();
@@ -37,11 +37,12 @@
delegating_cache.destroy();
}
- public void testLoadAndStore()throws Exception
+ public void testLoadAndStore() throws Exception
{
//TODO intentional overload since this test does not pass
//http://jira.jboss.com/jira/browse/JBCACHE-851
}
+
public void testPartialLoadAndStore()
{
// do nothing
1.4 +23 -28 JBossCache/tests/functional/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SingletonStoreCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- SingletonStoreCacheLoaderTest.java 20 Nov 2006 03:53:56 -0000 1.3
+++ SingletonStoreCacheLoaderTest.java 30 Dec 2006 17:49:57 -0000 1.4
@@ -6,18 +6,16 @@
*/
package org.jboss.cache.loader;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
-import org.jboss.cache.NodeImpl;
-import org.jboss.cache.TreeCache;
-import org.jboss.cache.TreeCacheProxyImpl;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.xml.XmlHelper;
import org.w3c.dom.Element;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* Unit test class for SingletonStoreCacheLoader
@@ -33,13 +31,9 @@
{
log.info("*** test:" + getName() + " ***");
- TreeCache tc1 = new TreeCache();
- TreeCache tc2 = new TreeCache();
- TreeCache tc3 = new TreeCache();
-
- cache1 = tc1.getCacheSPI();
- cache2 = tc2.getCacheSPI();
- cache3 = tc3.getCacheSPI();
+ cache1 = new CacheImpl();
+ cache2 = new CacheImpl();
+ cache3 = new CacheImpl();
cache1.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
cache2.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
@@ -377,7 +371,8 @@
try
{
scl.getPushStateThread().join();
- } catch (InterruptedException e)
+ }
+ catch (InterruptedException e)
{
throw new RuntimeException(e);
}
1.15 +22 -20 JBossCache/tests/functional/org/jboss/cache/loader/BdbjeTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BdbjeTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/BdbjeTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- BdbjeTest.java 26 Oct 2006 19:30:21 -0000 1.14
+++ BdbjeTest.java 30 Dec 2006 17:49:57 -0000 1.15
@@ -8,9 +8,9 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.loader.bdbje.BdbjeCacheLoaderConfig;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.util.stream.MarshalledValueInputStream;
@@ -35,7 +35,7 @@
* directory. Any scratch directory will do, but beware that all files in
* the directory will be deleted by setUp().</p>
*
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
public class BdbjeTest extends TestCase
{
@@ -44,7 +44,7 @@
private static final String envHome = ".";
private static final Fqn FQN = new Fqn("key");
- private TreeCache treeCache;
+ private CacheImpl cache;
private CacheLoader loader;
/**
@@ -109,16 +109,16 @@
}
loader = null;
}
- if (treeCache != null)
+ if (cache != null)
{
try
{
- treeCache.stop();
+ cache.stop();
}
catch (Exception ignored)
{
}
- treeCache = null;
+ cache = null;
}
}
@@ -134,18 +134,18 @@
{
/*
- * Create a dummy TreeCache object. This is used for setting the cluster
+ * Create a dummy CacheImpl object. This is used for setting the cluster
* name and TransactionManagerLookupClass (transactional) propertes only.
- * the TreeCache object is not used otherwise during testing.
+ * the CacheImpl object is not used otherwise during testing.
*/
- treeCache = new TreeCache();
- treeCache.getConfiguration().setClusterName("myCluster");
+ cache = new CacheImpl();
+ cache.getConfiguration().setClusterName("myCluster");
if (transactional)
{
- treeCache.getConfiguration().setTransactionManagerLookupClass(
+ cache.getConfiguration().setTransactionManagerLookupClass(
"org.jboss.cache.DummyTransactionManagerLookup");
}
- treeCache.start();
+ cache.start();
/* Derive the config string. */
String configStr;
@@ -162,7 +162,7 @@
instantiateLoader();
/* Initialize and start the loader. */
- loader.setCache(treeCache.getCacheSPI());
+ loader.setCache(cache);
BdbjeCacheLoaderConfig config = new BdbjeCacheLoaderConfig();
config.setLocation(configStr);
loader.setConfig(config);
@@ -185,7 +185,7 @@
throws Exception
{
- /* Create the cache loader as TreeCache would. */
+ /* Create the cache loader as CacheImpl would. */
Class cls =
Class.forName("org.jboss.cache.loader.bdbje.BdbjeCacheLoader");
loader = (CacheLoader) cls.newInstance();
@@ -814,7 +814,7 @@
throws Exception
{
- loader.setCache(new TreeCache().getCacheSPI());
+ loader.setCache(new CacheImpl());
loader.setConfig(null);
try
{
@@ -838,7 +838,7 @@
{
}
- loader.setCache(new TreeCache().getCacheSPI());
+ loader.setCache(new CacheImpl());
config = new BdbjeCacheLoaderConfig();
config.setLocation("directory_that_does_not_exist");
loader.setConfig(config);
@@ -1315,7 +1315,7 @@
assertTrue(baos.size() > STREAM_HEADER_LENGTH);
os.close();
- byte [] savedState = baos.toByteArray();
+ byte[] savedState = baos.toByteArray();
/* Clear state. */
baos = new ByteArrayOutputStream(1024);
@@ -1360,7 +1360,9 @@
*/
private static class Complex implements Serializable
{
- /** The serialVersionUID */
+ /**
+ * The serialVersionUID
+ */
private static final long serialVersionUID = -1259096627833244770L;
Complex nested;
1.11 +4 -4 JBossCache/tests/functional/org/jboss/cache/loader/ClusteredCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ClusteredCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/ClusteredCacheLoaderTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- ClusteredCacheLoaderTest.java 25 Oct 2006 04:50:19 -0000 1.10
+++ ClusteredCacheLoaderTest.java 30 Dec 2006 17:49:57 -0000 1.11
@@ -9,8 +9,8 @@
import junit.framework.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
import java.util.Map;
@@ -24,7 +24,7 @@
public class ClusteredCacheLoaderTest extends AbstractCacheLoaderTestBase
{
private static Log log = LogFactory.getLog(ClusteredCacheLoaderTest.class);
- private TreeCache cache1, cache2;
+ private CacheImpl cache1, cache2;
private CacheLoader loader1, loader2;
private Fqn fqn = Fqn.fromString("/a");
private String key = "key";
@@ -32,8 +32,8 @@
protected void setUp() throws Exception
{
if (cache1 != null || cache2 != null) tearDown();
- cache1 = new TreeCache();
- cache2 = new TreeCache();
+ cache1 = new CacheImpl();
+ cache2 = new CacheImpl();
cache1.getConfiguration().setClusterName("CCL-Test");
cache1.getConfiguration().setInitialStateRetrievalTimeout(2000);
1.7 +6 -6 JBossCache/tests/functional/org/jboss/cache/loader/DummyCacheLoader.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DummyCacheLoader.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/DummyCacheLoader.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- DummyCacheLoader.java 23 Oct 2006 05:47:30 -0000 1.6
+++ DummyCacheLoader.java 30 Dec 2006 17:49:57 -0000 1.7
@@ -6,9 +6,9 @@
*/
package org.jboss.cache.loader;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import java.io.ObjectInputStream;
@@ -69,14 +69,14 @@
}
/**
- * This method allows the CacheLoader to set the TreeCache, therefore allowing the CacheLoader to invoke
- * methods of the TreeCache. It can also use the TreeCache to fetch configuration information. Alternatively,
+ * This method allows the CacheLoader to set the CacheImpl, therefore allowing the CacheLoader to invoke
+ * methods of the CacheImpl. It can also use the CacheImpl to fetch configuration information. Alternatively,
* the CacheLoader could maintain its own configuration<br/>
* This method will be called directly after the CacheLoader instance has been created
*
* @param c The cache on which this loader works
*/
- public void setCache(TreeCache c)
+ public void setCache(CacheImpl c)
{
}
1.25 +4 -4 JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderWithReplicationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- CacheLoaderWithReplicationTest.java 13 Nov 2006 14:20:31 -0000 1.24
+++ CacheLoaderWithReplicationTest.java 30 Dec 2006 17:49:57 -0000 1.25
@@ -11,8 +11,8 @@
import junit.framework.TestSuite;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.misc.TestingUtil;
@@ -26,7 +26,7 @@
*/
public class CacheLoaderWithReplicationTest extends AbstractCacheLoaderTestBase
{
- private TreeCache cache1, cache2;
+ private CacheImpl cache1, cache2;
private String tmpLocation1 = System.getProperty("java.io.tmpdir", ".") + File.separator + "JBossCache-CacheLoaderWithReplicationTest1";
private String tmpLocation2 = System.getProperty("java.io.tmpdir", ".") + File.separator + "JBossCache-CacheLoaderWithReplicationTest2";
private File dir1 = new File(tmpLocation1);
@@ -52,11 +52,11 @@
public void setUp() throws Exception
{
- cache1 = new TreeCache();
+ cache1 = new CacheImpl();
cache1.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + tmpLocation1, false, true, false));
cache1.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
- cache2 = new TreeCache();
+ cache2 = new CacheImpl();
cache2.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + tmpLocation2, false, true, false));
cache2.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
}
1.39 +7 -7 JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderTestsBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderTestsBase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderTestsBase.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- CacheLoaderTestsBase.java 15 Dec 2006 17:30:31 -0000 1.38
+++ CacheLoaderTestsBase.java 30 Dec 2006 17:49:57 -0000 1.39
@@ -3,10 +3,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheException;
-import org.jboss.cache.DataNode;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.Node;
import org.jboss.cache.buddyreplication.BuddyManager;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.statetransfer.StateTransferManager;
@@ -29,13 +29,13 @@
* Commons tests for all CacheLoaders
*
* @author Bela Ban
- * @version $Id: CacheLoaderTestsBase.java,v 1.38 2006/12/15 17:30:31 msurtani Exp $
+ * @version $Id: CacheLoaderTestsBase.java,v 1.39 2006/12/30 17:49:57 msurtani Exp $
*/
abstract public class CacheLoaderTestsBase extends AbstractCacheLoaderTestBase
{
private static final Log log = LogFactory.getLog(CacheLoaderTestsBase.class);
- TreeCache cache;
+ CacheImpl cache;
CacheLoader loader = null;
private Transaction tx = null;
static final Fqn FQN = new Fqn("key");
@@ -62,7 +62,7 @@
{
super.setUp();
log.debug("\nTest " + getName() + "\n");
- cache = new TreeCache();
+ cache = new CacheImpl();
Configuration c = new Configuration();
cache.setConfiguration(c);
c.setCacheMode(Configuration.CacheMode.LOCAL);
@@ -329,7 +329,7 @@
assertNotNull("Should not be null", retval);
- DataNode node = (DataNode) retval;
+ Node node = (Node) retval;
assertEquals(10, node.get("1"));
}
@@ -544,7 +544,7 @@
cache.put("/a/3", null);
System.out.println("cache is " + cache.printLockInfo());
- DataNode n = cache.get("/a");
+ Node n = cache.get("/a");
assertNotNull(n);
Set children = cache.getChildrenNames("/a");
1.9 +4 -4 JBossCache/tests/functional/org/jboss/cache/loader/RpcDelegatingCacheLoaderTests.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RpcDelegatingCacheLoaderTests.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/RpcDelegatingCacheLoaderTests.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- RpcDelegatingCacheLoaderTests.java 25 Oct 2006 04:50:19 -0000 1.8
+++ RpcDelegatingCacheLoaderTests.java 30 Dec 2006 17:49:57 -0000 1.9
@@ -1,7 +1,7 @@
package org.jboss.cache.loader;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
@@ -11,11 +11,11 @@
/**
* @author Bela Ban
- * @version $Id: RpcDelegatingCacheLoaderTests.java,v 1.8 2006/10/25 04:50:19 bstansberry Exp $
+ * @version $Id: RpcDelegatingCacheLoaderTests.java,v 1.9 2006/12/30 17:49:57 msurtani Exp $
*/
public class RpcDelegatingCacheLoaderTests
{
- TreeCache cache;
+ CacheImpl cache;
public static void main(String[] args)
@@ -56,7 +56,7 @@
private void start(boolean client) throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
cache.getConfiguration().setClusterName("test-cluster");
cache.getConfiguration().setInitialStateRetrievalTimeout(3000);
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
1.7 +5 -5 JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderPurgingTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderPurgingTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderPurgingTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- CacheLoaderPurgingTest.java 25 Oct 2006 04:50:19 -0000 1.6
+++ CacheLoaderPurgingTest.java 30 Dec 2006 17:49:57 -0000 1.7
@@ -7,8 +7,8 @@
package org.jboss.cache.loader;
import org.jboss.cache.CacheException;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.xml.XmlHelper;
@@ -19,7 +19,7 @@
*/
public class CacheLoaderPurgingTest extends AbstractCacheLoaderTestBase
{
- private TreeCache cache;
+ private CacheImpl cache;
private String key = "key", value = "value";
private Fqn fqn = Fqn.fromString("/a/b/c");
@@ -35,7 +35,7 @@
public void testSingleLoaderNoPurge() throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
Configuration c = new Configuration();
cache.setConfiguration(c);
c.setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "location=" + System.getProperty("java.io.tmpdir", "/tmp") + "/" + "CacheLoaderPurgingTest", false, false, false));
@@ -59,7 +59,7 @@
public void testSingleLoaderPurge() throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
Configuration c = new Configuration();
cache.setConfiguration(c);
c.setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "location=" + System.getProperty("java.io.tmpdir", "/tmp") + "/" + "CacheLoaderPurgingTest", false, false, false, true));
@@ -86,7 +86,7 @@
public void testTwoLoadersPurge() throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
String xml = "<config>\n" +
"<passivation>false</passivation>\n" +
More information about the jboss-cvs-commits
mailing list