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

Manik Surtani msurtani at jboss.com
Wed Jul 19 17:34:43 EDT 2006


  User: msurtani
  Date: 06/07/19 17:34:43

  Modified:    src/org/jboss/cache/aop    MarshalledTreeCache.java
                        PojoCache.java TreeCacheAop.java
  Log:
  JBCACHE-657
  JBCACHE-594
  
  Revision  Changes    Path
  1.13      +7 -3      JBossCache/src/org/jboss/cache/aop/MarshalledTreeCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MarshalledTreeCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/MarshalledTreeCache.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- MarshalledTreeCache.java	18 Jul 2006 10:50:45 -0000	1.12
  +++ MarshalledTreeCache.java	19 Jul 2006 21:34:43 -0000	1.13
  @@ -11,6 +11,7 @@
   import org.jboss.cache.CacheException;
   import org.jboss.cache.CacheListener;
   import org.jboss.cache.CacheSPI;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.lock.IsolationLevel;
   import org.jboss.invocation.MarshalledValue;
   import org.jgroups.JChannel;
  @@ -54,7 +55,8 @@
                          long state_fetch_timeout)
            throws Exception
      {
  -      super(cluster_name, props, state_fetch_timeout);
  +       // TODO: Use factory
  +      //super(cluster_name, props, state_fetch_timeout);
         this._init();
      }
   
  @@ -71,8 +73,10 @@
   
      private void _init() throws Exception {
         localCopy_ = new TreeCache();
  -      localCopy_.setCacheMode(TreeCache.LOCAL);
  -      localCopy_.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
  +      Configuration conf = new Configuration();
  +      conf.setCacheMode("LOCAL");
  +      conf.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
  +      localCopy_.setConfiguration(conf);
         marshalling_ = true;
         useLocalOptimization_ = true;
         tcl_ = null;
  
  
  
  1.27      +8 -6      JBossCache/src/org/jboss/cache/aop/PojoCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/PojoCache.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- PojoCache.java	13 Jul 2006 09:32:52 -0000	1.26
  +++ PojoCache.java	19 Jul 2006 21:34:43 -0000	1.27
  @@ -48,7 +48,7 @@
    * @author Ben Wang
    * @since 1.4
    */
  -public class PojoCache extends TreeCache implements PojoCacheMBean
  +public class PojoCache extends TreeCache// implements PojoCacheMBean //TODO: Need to properly implement a JMX interface
   {
      // Class -> CachedType
      // use WeakHashMap to allow class reloading
  @@ -69,7 +69,9 @@
                       long state_fetch_timeout)
            throws Exception
      {
  -      super(cluster_name, props, state_fetch_timeout);
  +       // TODO: use a CacheFactory
  +
  +      //super(cluster_name, props, state_fetch_timeout);
         init();
      }
   
  @@ -118,7 +120,7 @@
       */
      public void setEvictionPolicyClass(String eviction_policy_class)
      {
  -      this.eviction_policy_class = eviction_policy_class;
  +      getConfiguration().setEvictionPolicyClass(eviction_policy_class);
         if (eviction_policy_class == null || eviction_policy_class.length() == 0)
            return;
   
  @@ -128,7 +130,7 @@
            if (! (obj instanceof AopEvictionPolicy))
               throw new RuntimeException("PojoCache.setEvictionPolicyClass(). Eviction policy provider:" +
                     eviction_policy_class + " is not an instance of AopEvictionPolicy.");
  -         super.setEvictionPolicyClass(eviction_policy_class);
  +         getConfiguration().setEvictionPolicyClass(eviction_policy_class);
         }
         catch (RuntimeException ex)
         {
  @@ -266,7 +268,7 @@
       */
      public void activateRegion(String subtreeFqn) throws RegionNotEmptyException, RegionNameConflictException, CacheException
      {
  -      if (!useRegionBasedMarshalling)
  +      if (!getConfiguration().isUseRegionBasedMarshalling())
            throw new IllegalStateException("TreeCache.activateRegion(). useRegionBasedMarshalling flag is not set!");
   
         if ("/".equals(subtreeFqn))
  @@ -279,7 +281,7 @@
         {
            // If the internal region is not activated yet, activate it first
            Region region = regionManager_.getRegion(InternalDelegate.JBOSS_INTERNAL);
  -         if ((region == null && inactiveOnStartup)
  +         if ((region == null && getConfiguration().isInactiveOnStartup())
                  || (region != null && region.isInactive()))
            {
               super.activateRegion(InternalDelegate.JBOSS_INTERNAL.toString());
  
  
  
  1.28      +1 -1      JBossCache/src/org/jboss/cache/aop/TreeCacheAop.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheAop.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/TreeCacheAop.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- TreeCacheAop.java	12 Apr 2006 03:16:46 -0000	1.27
  +++ TreeCacheAop.java	19 Jul 2006 21:34:43 -0000	1.28
  @@ -13,7 +13,7 @@
    * @author Ben Wang
    * @deprecated Since 1.4, replaced by {@link PojoCache}
    */
  -public class TreeCacheAop extends PojoCache implements TreeCacheAopMBean
  +public class TreeCacheAop extends PojoCache //implements TreeCacheAopMBean // TODO; Need to come up with proper JMX interfaces
   {
      public TreeCacheAop(String cluster_name,
                          String props,
  
  
  



More information about the jboss-cvs-commits mailing list