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

Brian Stansberry brian.stansberry at jboss.com
Thu Nov 16 02:48:00 EST 2006


  User: bstansberry
  Date: 06/11/16 02:48:00

  Modified:    src/org/jboss/cache  RegionManager.java
  Log:
  Add some comments for future work
  
  Revision  Changes    Path
  1.10      +21 -5     JBossCache/src/org/jboss/cache/RegionManager.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RegionManager.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/RegionManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- RegionManager.java	15 Nov 2006 23:48:31 -0000	1.9
  +++ RegionManager.java	16 Nov 2006 07:48:00 -0000	1.10
  @@ -243,13 +243,18 @@
               {
                  // This region's state will no match that of a non-existent one
                  // So, there is no reason to keep this region any more
  +               
  +               // (Brian) We shouldn't do this anymore; now outside code
  +               // can have a ref to the region!!
                  removeRegion(fqn);
               }
               else
               {
                  //r.activate();
                  r.setActive(true);
  -               if (treeCache.getConfiguration().isFetchInMemoryState()) treeCache.activateRegion(r.getFqn().toString());
  +               // FIXME - persistent state transfer counts too!
  +               if (treeCache.getConfiguration().isFetchInMemoryState()) 
  +                  treeCache.activateRegion(r.getFqn().toString());               
               }
            }
            else if (defaultInactive)
  @@ -257,7 +262,9 @@
               // "Active" region is not the default, so create a region
               r = getRegion(fqn, true);
               r.setActive(true);
  -            if (treeCache.getConfiguration().isFetchInMemoryState()) treeCache.activateRegion(r.getFqn().toString());
  +            // FIXME - persistent state transfer counts too!
  +            if (treeCache.getConfiguration().isFetchInMemoryState()) 
  +               treeCache.activateRegion(r.getFqn().toString());            
            }
         }
         catch (Exception e)
  @@ -312,20 +319,29 @@
               {
                  // This region's state will no match that of a non-existent one
                  // So, there is no reason to keep this region any more
  +               
  +               // FIXME (Brian) We shouldn't do this anymore; now outside code
  +               // can have a ref to the region!!
                  removeRegion(fqn);
               }
               else
               {
                  //region.deactivate();
                  region.setActive(false);
  -               if (treeCache.getConfiguration().isFetchInMemoryState())  treeCache.inactivateRegion(fqn.toString());
  +               // FIXME - we should always clean up; otherwise stale data 
  +               // is in memory!
  +               if (treeCache.getConfiguration().isFetchInMemoryState())  
  +                  treeCache.inactivateRegion(fqn.toString());
               }
            }
            else if (!defaultInactive)
            {
               region = getRegion(fqn, true);
               region.setActive(false);
  -            if (treeCache.getConfiguration().isFetchInMemoryState()) treeCache.inactivateRegion(fqn.toString());
  +            // FIXME - we should always clean up; otherwise stale data 
  +            // is in memory!
  +            if (treeCache.getConfiguration().isFetchInMemoryState()) 
  +               treeCache.inactivateRegion(fqn.toString());
            }
         }
         catch (Exception e)
  @@ -445,7 +461,7 @@
    * @author Ben Wang 02-2004
    * @author Daniel Huang (dhuang at jboss.org)
    * @author Brian Stansberry
  - * @version $Id: RegionManager.java,v 1.9 2006/11/15 23:48:31 msurtani Exp $
  + * @version $Id: RegionManager.java,v 1.10 2006/11/16 07:48:00 bstansberry Exp $
    */
   /*public class ERegionManager
   {
  
  
  



More information about the jboss-cvs-commits mailing list