[jboss-cvs] CacheBenchFwk/src/org/cachebench/cachewrappers ...

Manik Surtani manik at jboss.org
Tue Mar 13 10:43:02 EDT 2007


  User: msurtani
  Date: 07/03/13 10:43:02

  Modified:    src/org/cachebench/cachewrappers    
                        TangosolCacheWrapper.java JBossCacheWrapper.java
  Added:       src/org/cachebench/cachewrappers    
                        JBossCache200Wrapper.java
  Removed:     src/org/cachebench/cachewrappers     WhirlyCacheWrapper.java
  Log:
  Updated
  
  Revision  Changes    Path
  1.2       +10 -9     CacheBenchFwk/src/org/cachebench/cachewrappers/TangosolCacheWrapper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TangosolCacheWrapper.java
  ===================================================================
  RCS file: /cvsroot/jboss/CacheBenchFwk/src/org/cachebench/cachewrappers/TangosolCacheWrapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- TangosolCacheWrapper.java	9 Feb 2006 06:14:57 -0000	1.1
  +++ TangosolCacheWrapper.java	13 Mar 2007 14:43:02 -0000	1.2
  @@ -8,16 +8,17 @@
   import java.util.Properties;
   import java.io.Serializable;
   
  -import com.tangosol.net.NamedCache;
  -import com.tangosol.net.CacheFactory;
  +//import com.tangosol.net.NamedCache;
  +//import com.tangosol.net.CacheFactory;
   
   /**
    * An Implementation of the CacheWrapper that used tangosol coherence 3.0
    *
    * @author Imran Bohoran
  - * @version $Id: TangosolCacheWrapper.java,v 1.1 2006/02/09 06:14:57 imran Exp $
  + * @version $Id: TangosolCacheWrapper.java,v 1.2 2007/03/13 14:43:02 msurtani Exp $
    */
  -public class TangosolCacheWrapper implements SerializableCacheWrapper {
  +public class TangosolCacheWrapper {//implements SerializableCacheWrapper {
  +   /*
       NamedCache cache;
       private Log logger = LogFactory.getLog("org.cachebench.cachewrappers.TangosolCacheWrapper");
   
  @@ -61,10 +62,10 @@
       /* (non-Javadoc)
        * @see org.cachebench.CacheWrapper#get(java.lang.Object)
        */
  -    public Object get(Object key) throws Exception
  -    {
  -        logger.warn("Get: Does not deal with non-Serializables, should not be called.");
  -        return null;
  -    }
  +//    public Object get(Object key) throws Exception
  +//    {
  +//        logger.warn("Get: Does not deal with non-Serializables, should not be called.");
  +//        return null;
  +//    }
   
   }
  
  
  
  1.4       +16 -16    CacheBenchFwk/src/org/cachebench/cachewrappers/JBossCacheWrapper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JBossCacheWrapper.java
  ===================================================================
  RCS file: /cvsroot/jboss/CacheBenchFwk/src/org/cachebench/cachewrappers/JBossCacheWrapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- JBossCacheWrapper.java	27 Dec 2005 05:28:08 -0000	1.3
  +++ JBossCacheWrapper.java	13 Mar 2007 14:43:02 -0000	1.4
  @@ -5,24 +5,24 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.cachebench.CacheWrapper;
  -import org.jboss.cache.PropertyConfigurator;
  -import org.jboss.cache.TreeCache;
  +//import org.jboss.cache.PropertyConfigurator;
  +//import org.jboss.cache.TreeCache;
   
   
   /**
    * An implementation of CacheWrapper that uses JBossCache as an underlying implementation.
    *
    * @author Manik Surtani (manik at surtani.org)
  - * @version $Id: JBossCacheWrapper.java,v 1.3 2005/12/27 05:28:08 imran Exp $
  + * @version $Id: JBossCacheWrapper.java,v 1.4 2007/03/13 14:43:02 msurtani Exp $
    */
  -public class JBossCacheWrapper implements CacheWrapper
  -{
  +public class JBossCacheWrapper {//implements CacheWrapper
  +/*{
       private TreeCache tree;
       private Log logger = LogFactory.getLog("org.cachebench.cachewrappers.JBossCacheWrapper");
   
  -    /* (non-Javadoc)
  +    *//* (non-Javadoc)
        * @see org.jboss.cachebench.CacheWrapper#init(java.util.Properties)
  -     */
  +     *//*
       public void init(Properties parameters) throws Exception
       {
   //        try
  @@ -40,9 +40,9 @@
   //        }
       }
   
  -    /* (non-Javadoc)
  +    *//* (non-Javadoc)
        * @see org.jboss.cachebench.CacheWrapper#setUp()
  -     */
  +     *//*
       public void setUp() throws Exception
       {
           logger.debug("Run StepUp on Cache");
  @@ -58,9 +58,9 @@
   //        }
       }
   
  -    /* (non-Javadoc)
  +    *//* (non-Javadoc)
        * @see org.jboss.cachebench.CacheWrapper#tearDown()
  -     */
  +     *//*
       public void tearDown() throws Exception
       {
           logger.debug("Cache Shutdown Initiated");
  @@ -69,9 +69,9 @@
           logger.debug("Cahce Shutdown Completed");
       }
   
  -    /* (non-Javadoc)
  +    *//* (non-Javadoc)
        * @see org.jboss.cachebench.CacheWrapper#put(java.lang.Object, java.lang.Object)
  -     */
  +     *//*
       public void put(Object key, Object value) throws Exception
       {
           HashMap map = new HashMap(1);
  @@ -86,9 +86,9 @@
   //        }
       }
   
  -    /* (non-Javadoc)
  +    *//* (non-Javadoc)
        * @see org.jboss.cachebench.CacheWrapper#get(java.lang.Object)
  -     */
  +     *//*
       public Object get(Object key) throws Exception
       {
   //        try
  @@ -112,6 +112,6 @@
   //        {
   //            logger.error("Problems emptying tree cache", e);
   //        }
  -    }
  +    }*/
       
   }
  
  
  
  1.1      date: 2007/03/13 14:43:02;  author: msurtani;  state: Exp;CacheBenchFwk/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java
  
  Index: JBossCache200Wrapper.java
  ===================================================================
  package org.cachebench.cachewrappers;
  
  import org.cachebench.CacheWrapper;
  import org.jboss.cache.Cache;
  import org.jboss.cache.CacheFactory;
  import org.jboss.cache.DefaultCacheFactory;
  import org.jboss.cache.Fqn;
  
  import java.util.Properties;
  
  public class JBossCache200Wrapper implements CacheWrapper
  {
     private Cache cache;
     public void init(Properties parameters) throws Exception
     {
        cache = DefaultCacheFactory.getInstance().createCache(parameters.getProperty("config"));
     }
  
     public void setUp() throws Exception
     {
     }
  
     public void tearDown() throws Exception
     {
     }
  
     public void put(Object key, Object value) throws Exception
     {
        cache.put(new Fqn(new Object[]{"root", key}), key, value);
     }
  
     public Object get(Object key) throws Exception
     {
        return cache.get(new Fqn(new Object[]{"root", key}), key);
     }
  
     public void empty() throws Exception
     {
        cache.removeNode(Fqn.ROOT);
     }
  }
  
  
  



More information about the jboss-cvs-commits mailing list