[jboss-cvs] JBossCache/src/org/jboss/cache/loader/tcp ...

Manik Surtani msurtani at jboss.com
Sat Dec 30 12:50:01 EST 2006


  User: msurtani
  Date: 06/12/30 12:50:01

  Modified:    src/org/jboss/cache/loader/tcp   TcpCacheServer.java
                        TcpCacheServerMBean.java
  Log:
  Major changes to restructure cache and node object model
  
  Revision  Changes    Path
  1.22      +12 -12    JBossCache/src/org/jboss/cache/loader/tcp/TcpCacheServer.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TcpCacheServer.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/tcp/TcpCacheServer.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- TcpCacheServer.java	25 Oct 2006 12:49:31 -0000	1.21
  +++ TcpCacheServer.java	30 Dec 2006 17:50:01 -0000	1.22
  @@ -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.factories.XmlConfigurationParser;
   import org.jboss.cache.jmx.JmxUtil;
   import org.jboss.cache.loader.DelegatingCacheLoader;
  @@ -37,14 +37,14 @@
    * TCP-IP based CacheServer, configure TcpDelegatingCacheLoader with host and port of this server
    *
    * @author Bela Ban
  - * @version $Id: TcpCacheServer.java,v 1.21 2006/10/25 12:49:31 msurtani Exp $
  + * @version $Id: TcpCacheServer.java,v 1.22 2006/12/30 17:50:01 msurtani Exp $
    */
   public class TcpCacheServer implements TcpCacheServerMBean
   {
      ServerSocket srv_sock;
      InetAddress bind_addr = null;
      int port = 7500;
  -   TreeCache cache;
  +   CacheImpl cache;
      //TreeCacheMBean cache;
      ObjectName cache_name;
      String config;
  @@ -107,12 +107,12 @@
      }
   
      //public TreeCacheMBean getCache() {
  -   public TreeCache getCache()
  +   public CacheImpl getCache()
      {
         return cache;
      }
   
  -   public void setCache(TreeCache cache)
  +   public void setCache(CacheImpl cache)
      {
   //public void setCache(TreeCacheMBean cache) {
         this.cache = cache;
  @@ -139,8 +139,8 @@
            // 1. check whether we have an object name, pointing to the cache MBean
            if (cache_name != null && server != null)
            {
  -            //cache = (TreeCache) MBeanProxyExt.create(TreeCache.class, cache_name, server);
  -            cache = (TreeCache) MBeanServerInvocationHandler.newProxyInstance(server, cache_name, TreeCache.class, false);
  +            //cache = (CacheImpl) MBeanProxyExt.create(CacheImpl.class, cache_name, server);
  +            cache = (CacheImpl) MBeanServerInvocationHandler.newProxyInstance(server, cache_name, CacheImpl.class, false);
            }
         }
   
  @@ -148,7 +148,7 @@
         { // still not set
            if (config != null)
            {
  -            cache = new TreeCache();
  +            cache = new CacheImpl();
               cache.setConfiguration(new XmlConfigurationParser().parseFile(this.config));
               cache.create();
               cache.start();
  @@ -256,10 +256,10 @@
         Socket sock = null;
         ObjectInputStream input = null;
         ObjectOutputStream output = null;
  -      TreeCache c;
  +      CacheImpl c;
         Thread t = null;
   
  -      public Connection(Socket sock, TreeCache cache) throws IOException
  +      public Connection(Socket sock, CacheImpl cache) throws IOException
         {
            this.sock = sock;
   
  @@ -314,7 +314,7 @@
            Fqn fqn;
            Object key, val, retval;
            Map map;
  -         DataNode n;
  +         Node n;
            boolean flag;
            byte[] state;
   
  
  
  
  1.5       +4 -4      JBossCache/src/org/jboss/cache/loader/tcp/TcpCacheServerMBean.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TcpCacheServerMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/tcp/TcpCacheServerMBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- TcpCacheServerMBean.java	7 Sep 2006 13:52:28 -0000	1.4
  +++ TcpCacheServerMBean.java	30 Dec 2006 17:50:01 -0000	1.5
  @@ -1,6 +1,6 @@
   package org.jboss.cache.loader.tcp;
   
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.jmx.LifeCycle;
   
   import javax.management.MalformedObjectNameException;
  @@ -8,7 +8,7 @@
   
   /**
    * @author Bela Ban
  - * @version $Id: TcpCacheServerMBean.java,v 1.4 2006/09/07 13:52:28 msurtani Exp $
  + * @version $Id: TcpCacheServerMBean.java,v 1.5 2006/12/30 17:50:01 msurtani Exp $
    */
   public interface TcpCacheServerMBean extends LifeCycle
   {
  @@ -29,9 +29,9 @@
      void setConfig(String config);
   
      //TreeCacheMBean getCache();
  -   TreeCache getCache();
  +   CacheImpl getCache();
   
  -   void setCache(TreeCache cache);
  +   void setCache(CacheImpl cache);
      //void setCache(TreeCacheMBean cache);
   
      String getCacheName();
  
  
  



More information about the jboss-cvs-commits mailing list