[jboss-cvs] JBossCache/src/org/jboss/cache/config ...

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


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

  Modified:    src/org/jboss/cache/config   Configuration.java
                        ConfigurationComponent.java
  Log:
  Major changes to restructure cache and node object model
  
  Revision  Changes    Path
  1.28      +29 -31    JBossCache/src/org/jboss/cache/config/Configuration.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Configuration.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/Configuration.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- Configuration.java	11 Nov 2006 16:29:31 -0000	1.27
  +++ Configuration.java	30 Dec 2006 17:50:00 -0000	1.28
  @@ -6,7 +6,7 @@
    */
   package org.jboss.cache.config;
   
  -import org.jboss.cache.TreeCache;
  +import org.jboss.cache.CacheImpl;
   import org.jboss.cache.Version;
   import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.lock.IsolationLevel;
  @@ -33,7 +33,7 @@
   
      public static CacheMode legacyModeToCacheMode(int legacyMode)
      {
  -      switch(legacyMode)
  +      switch (legacyMode)
         {
            case 1:
               return CacheMode.LOCAL;
  @@ -56,7 +56,8 @@
       */
      public enum NodeLockingScheme
      {
  -      PESSIMISTIC, OPTIMISTIC }
  +      PESSIMISTIC, OPTIMISTIC
  +   }
   
      /**
       * Default replication version, from {@link Version#getVersionShort}.
  @@ -67,7 +68,7 @@
      //   CONFIGURATION OPTIONS
      // ------------------------------------------------------------------------------------------------------------
   
  -   private String clusterName = "TreeCache-Group";
  +   private String clusterName = "JBossCache-Cluster";
      private String clusterConfig = null;
      private boolean useReplQueue = false;
      @Dynamic
  @@ -108,11 +109,11 @@
      // ------------------------------------------------------------------------------------------------------------
   
      /**
  -    * Sets a reference to an existing TreeCache instance
  +    * Sets a reference to an existing CacheImpl instance
       *
       * @param cache
       */
  -   public Configuration(TreeCache cache)
  +   public Configuration(CacheImpl cache)
      {
         setTreeCache(cache);
      }
  @@ -543,13 +544,10 @@
         this.runtimeConfig = runtimeConfig;
      }
      
  -
      // ------------------------------------------------------------------------------------------------------------
      //   HELPERS
      // ------------------------------------------------------------------------------------------------------------
   
  -   
  -
      // ------------------------------------------------------------------------------------------------------------
      //   OVERRIDDEN METHODS
      // ------------------------------------------------------------------------------------------------------------
  
  
  
  1.3       +31 -30    JBossCache/src/org/jboss/cache/config/ConfigurationComponent.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConfigurationComponent.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/ConfigurationComponent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- ConfigurationComponent.java	10 Nov 2006 04:38:48 -0000	1.2
  +++ ConfigurationComponent.java	30 Dec 2006 17:50:00 -0000	1.3
  @@ -6,6 +6,10 @@
    */
   package org.jboss.cache.config;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
  +import org.jboss.cache.CacheImpl;
  +
   import java.io.Serializable;
   import java.util.Collection;
   import java.util.Collections;
  @@ -13,17 +17,12 @@
   import java.util.Iterator;
   import java.util.Set;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.TreeCache;
  -
   /**
    * Base superclass of Cache configuration classes that expose some properties
    * that can be changed after the cache is started.
    * 
    * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
  - * @version $Revision: 1.2 $
  - * 
  + * @version $Revision: 1.3 $
    * @see #testImmutability(String)
    */
   public class ConfigurationComponent implements Serializable, Cloneable
  @@ -31,11 +30,13 @@
      private static final long serialVersionUID = 4879873994727821938L;
      
      protected Log log = LogFactory.getLog(getClass());
  -   private TreeCache cache; // back-reference to test whether the cache is running.
  +   private CacheImpl cache; // back-reference to test whether the cache is running.
      private Set<ConfigurationComponent> children = 
         Collections.synchronizedSet(new HashSet<ConfigurationComponent>());
      
  -   protected ConfigurationComponent() {}
  +   protected ConfigurationComponent()
  +   {
  +   }
      
      public void passCacheToChildConfig(ConfigurationComponent child)
      {
  @@ -110,7 +111,7 @@
         }
      }
      
  -   protected TreeCache getTreeCache()
  +   protected CacheImpl getTreeCache()
      {
         return cache;
      }
  @@ -120,7 +121,7 @@
       *
       * @param cache
       */
  -   public void setTreeCache(TreeCache cache)
  +   public void setTreeCache(CacheImpl cache)
      {
         this.cache = cache;
         synchronized (children)
  @@ -141,7 +142,7 @@
   
      /**
       * Null-safe equality test.
  -    * 
  +    * <p/>
       * FIXME this must be written elsewhere.
       */
      protected static boolean safeEquals(Object a, Object b)
  
  
  



More information about the jboss-cvs-commits mailing list