[jboss-cvs] CacheBenchFwk/cache-products/ehcache-1.2.4/src/org/cachebench/cachewrappers ...
Manik Surtani
manik at jboss.org
Fri May 18 10:32:09 EDT 2007
User: msurtani
Date: 07/05/18 10:32:09
Modified: cache-products/ehcache-1.2.4/src/org/cachebench/cachewrappers
EHCacheWrapper.java
Added: cache-products/ehcache-1.2.4/src/org/cachebench/cachewrappers
EHCacheTest.java
Log:
fixed stuff
Revision Changes Path
1.3 +2 -2 CacheBenchFwk/cache-products/ehcache-1.2.4/src/org/cachebench/cachewrappers/EHCacheWrapper.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EHCacheWrapper.java
===================================================================
RCS file: /cvsroot/jboss/CacheBenchFwk/cache-products/ehcache-1.2.4/src/org/cachebench/cachewrappers/EHCacheWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- EHCacheWrapper.java 17 May 2007 09:38:04 -0000 1.2
+++ EHCacheWrapper.java 18 May 2007 14:32:09 -0000 1.3
@@ -17,7 +17,7 @@
* An implementation of SerializableCacheWrapper that uses EHCache as an underlying implementation.
*
* @author Manik Surtani (manik at surtani.org)
- * @version $Id: EHCacheWrapper.java,v 1.2 2007/05/17 09:38:04 msurtani Exp $
+ * @version $Id: EHCacheWrapper.java,v 1.3 2007/05/18 14:32:09 msurtani Exp $
*/
public class EHCacheWrapper implements SerializableCacheWrapper
{
@@ -101,6 +101,6 @@
public String getInfo()
{
- return cache.getKeys().toString();
+ return cache.getKeys().toString() + " remote peers: " + manager.getCachePeerListener().getBoundCachePeers();
}
}
1.1 date: 2007/05/18 14:32:09; author: msurtani; state: Exp;CacheBenchFwk/cache-products/ehcache-1.2.4/src/org/cachebench/cachewrappers/EHCacheTest.java
Index: EHCacheTest.java
===================================================================
package org.cachebench.cachewrappers;
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
import java.net.URL;
import java.io.File;
/**
* // TODO: Add Javadocs
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
*/
public class EHCacheTest
{
public static void main(String[] args) throws Exception
{
Ehcache cache;
URL url = new URL("file:///Users/manik/Code/CacheBenchFwk/cache-products/ehcache-1.2.4/conf/ehcache-repl-sync.xml");
System.out.println("URL " + url);
System.out.println("FIle: " + url.getFile());
CacheManager m = CacheManager.create(url);
System.out.println("Caches:");
for (String s : m.getCacheNames()) System.out.println(" " + s);
cache = m.getCache("cache");
for (int i=0; i<100; i++) cache.put(new Element("key" + i, "value" + i));
System.out.println(cache.getKeys());
System.out.println("members: " + m.getCachePeerListener().getBoundCachePeers());
m.shutdown();
}
}
More information about the jboss-cvs-commits
mailing list