[jbosscache-commits] JBoss Cache SVN: r5812 - in benchmarks/benchmark-fwk/trunk/cache-products: jbosscache-2.1.0/src/org/cachebench/cachewrappers and 1 other directories.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Thu May 8 07:41:44 EDT 2008
Author: manik.surtani at jboss.com
Date: 2008-05-08 07:41:43 -0400 (Thu, 08 May 2008)
New Revision: 5812
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java
Log:
Added the ability to run in LOCAL mode as well.
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java 2008-05-08 11:24:35 UTC (rev 5811)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java 2008-05-08 11:41:43 UTC (rev 5812)
@@ -17,6 +17,7 @@
{
private Cache cache;
private Log log = LogFactory.getLog(JBossCache200Wrapper.class);
+ private boolean inLocalMode;
public void init(Map parameters) throws Exception
{
@@ -27,6 +28,7 @@
log.info("Running follwing JBossCacheVersion: " + org.jboss.cache.Version.version);
log.info("Running follwing JBossCacheCodeName: " + org.jboss.cache.Version.codename);
cache = DefaultCacheFactory.getInstance().createCache(configFile);
+ inLocalMode = parameters.containsKey("localOnly");
}
public void setUp() throws Exception
@@ -59,7 +61,7 @@
public int getNumMembers()
{
- return cache.getMembers().size();
+ return inLocalMode ? 0 : cache.getMembers().size();
}
public String getInfo()
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java 2008-05-08 11:24:35 UTC (rev 5811)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java 2008-05-08 11:41:43 UTC (rev 5812)
@@ -1,14 +1,14 @@
package org.cachebench.cachewrappers;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.cachebench.CacheWrapper;
import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
-import org.jboss.cache.CacheSPI;
+import org.jboss.cache.buddyreplication.GravitateResult;
import org.jboss.cache.marshall.NodeData;
-import org.jboss.cache.buddyreplication.GravitateResult;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.cachebench.CacheWrapper;
import java.util.Map;
@@ -20,14 +20,16 @@
{
private Cache cache;
private Log log = LogFactory.getLog(JBossCache210Wrapper.class);
+ private boolean inLocalMode;
public void init(Map parameters) throws Exception
{
log.info("Creating cache with the following configuration: " + parameters);
- cache = DefaultCacheFactory.getInstance().createCache((String)parameters.get("config"));
+ cache = DefaultCacheFactory.getInstance().createCache((String) parameters.get("config"));
log.info("Running cache with following config: " + cache.getConfiguration());
log.info("Running follwing JBossCacheVersion: " + org.jboss.cache.Version.version);
log.info("Running follwing JBossCacheCodeName: " + org.jboss.cache.Version.codename);
+ inLocalMode = parameters.containsKey("localOnly");
}
public void setUp() throws Exception
@@ -60,7 +62,7 @@
public int getNumMembers()
{
- return cache.getMembers().size();
+ return inLocalMode ? 0 : cache.getMembers().size();
}
public String getInfo()
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java 2008-05-08 11:24:35 UTC (rev 5811)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java 2008-05-08 11:41:43 UTC (rev 5812)
@@ -3,7 +3,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.cachebench.CacheWrapper;
-import org.jboss.cache.*;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
import org.jboss.cache.buddyreplication.GravitateResult;
import org.jboss.cache.marshall.NodeData;
@@ -17,14 +21,16 @@
{
private Cache cache;
private Log log = LogFactory.getLog(JBossCache220Wrapper.class);
+ private boolean inLocalMode;
public void init(Map parameters) throws Exception
{
log.info("Creating cache with the following configuration: " + parameters);
- cache = DefaultCacheFactory.getInstance().createCache((String)parameters.get("config"));
+ cache = DefaultCacheFactory.getInstance().createCache((String) parameters.get("config"));
log.info("Running cache with following config: " + cache.getConfiguration());
log.info("Running follwing JBossCacheVersion: " + org.jboss.cache.Version.version);
log.info("Running follwing JBossCacheCodeName: " + org.jboss.cache.Version.codename);
+ inLocalMode = parameters.containsKey("localOnly");
}
public void setUp() throws Exception
@@ -57,7 +63,7 @@
public int getNumMembers()
{
- return cache.getMembers().size();
+ return inLocalMode ? 0 : cache.getMembers().size();
}
public String getInfo()
More information about the jbosscache-commits
mailing list