[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader ...
Brian Stansberry
brian.stansberry at jboss.com
Mon Oct 23 01:47:30 EDT 2006
User: bstansberry
Date: 06/10/23 01:47:30
Modified: tests/functional/org/jboss/cache/loader BdbjeTest.java
DummyCacheLoader.java
InterceptorSynchronizationTest.java
DummyInMemoryCacheLoader.java
Log:
[JBCACHE-809] Pojo-style configuration for use by Microcontainer
Revision Changes Path
1.11 +12 -10 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.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- BdbjeTest.java 22 Sep 2006 16:27:56 -0000 1.10
+++ BdbjeTest.java 23 Oct 2006 05:47:30 -0000 1.11
@@ -11,6 +11,8 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.loader.bdbje.BdbjeCacheLoader;
+import org.jboss.cache.loader.bdbje.BdbjeCacheLoader.Config;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.invocation.MarshalledValueInputStream;
import org.jboss.invocation.MarshalledValueOutputStream;
@@ -35,7 +37,7 @@
* directory. Any scratch directory will do, but beware that all files in
* the directory will be deleted by setUp().</p>
*
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public class BdbjeTest extends TestCase
{
@@ -163,9 +165,9 @@
/* Initialize and start the loader. */
loader.setCache(treeCache.getCacheSPI());
- Properties props = new Properties();
- props.setProperty("location", configStr);
- loader.setConfig(props);
+ BdbjeCacheLoader.Config config = new BdbjeCacheLoader.Config();
+ config.setLocation(configStr);
+ loader.setConfig(config);
loader.create();
loader.start();
@@ -826,9 +828,9 @@
}
// loader.setCache(null);
- Properties props = new Properties();
- props.setProperty("location", "xyz");
- loader.setConfig(props);
+ Config config = new Config();
+ config.setLocation("xyz");
+ loader.setConfig(config);
try
{
loader.start();
@@ -839,9 +841,9 @@
}
loader.setCache(new TreeCache().getCacheSPI());
- props = new Properties();
- props.setProperty("location", "directory_that_does_not_exist");
- loader.setConfig(props);
+ config = new Config();
+ config.setLocation("directory_that_does_not_exist");
+ loader.setConfig(config);
try
{
loader.start();
1.6 +7 -2 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.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- DummyCacheLoader.java 31 Aug 2006 14:56:46 -0000 1.5
+++ DummyCacheLoader.java 23 Oct 2006 05:47:30 -0000 1.6
@@ -9,13 +9,13 @@
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;
import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.Set;
/**
@@ -59,10 +59,15 @@
*
* @param url A list of properties, defined in the XML file
*/
- public void setConfig(Properties url)
+ public void setConfig(IndividualCacheLoaderConfig config)
{
}
+ public IndividualCacheLoaderConfig getConfig()
+ {
+ return null;
+ }
+
/**
* 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,
1.5 +7 -3 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.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- InterceptorSynchronizationTest.java 6 Sep 2006 15:30:58 -0000 1.4
+++ InterceptorSynchronizationTest.java 23 Oct 2006 05:47:30 -0000 1.5
@@ -5,6 +5,7 @@
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;
import java.io.ObjectOutputStream;
@@ -14,7 +15,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.Set;
/**
@@ -85,9 +85,13 @@
*/
public class TestSlowCacheLoader extends AbstractCacheLoader
{
- public void setConfig(Properties arg0)
+ public void setConfig(IndividualCacheLoaderConfig config)
{
+ }
+ public IndividualCacheLoaderConfig getConfig()
+ {
+ return null;
}
public Set getChildrenNames(Fqn arg0) throws Exception
1.4 +8 -3 JBossCache/tests/functional/org/jboss/cache/loader/DummyInMemoryCacheLoader.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DummyInMemoryCacheLoader.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/DummyInMemoryCacheLoader.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- DummyInMemoryCacheLoader.java 22 Sep 2006 16:56:43 -0000 1.3
+++ DummyInMemoryCacheLoader.java 23 Oct 2006 05:47:30 -0000 1.4
@@ -10,12 +10,12 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
+import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.Set;
/**
@@ -29,10 +29,15 @@
private Log log = LogFactory.getLog(DummyInMemoryCacheLoader.class);
private Map<Object, List<Modification>> transactions = new HashMap<Object, List<Modification>>();
- public void setConfig(Properties properties)
+ public void setConfig(IndividualCacheLoaderConfig config)
{
}
+ public IndividualCacheLoaderConfig getConfig()
+ {
+ return null;
+ }
+
public Set getChildrenNames(Fqn fqn) throws Exception
{
log.debug("Calling getChildrenNames on Fqn " + fqn);
@@ -113,7 +118,7 @@
public void remove(Fqn fqn) throws Exception
{
log.debug("Removing fqn " + fqn);
- Node n = nodes.remove(fqn);
+ nodes.remove(fqn);
}
public void removeData(Fqn fqn) throws Exception
More information about the jboss-cvs-commits
mailing list