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

Manik Surtani manik at jboss.org
Tue Jul 31 12:19:36 EDT 2007


  User: msurtani
  Date: 07/07/31 12:19:36

  Modified:    src/org/jboss/cache  RegionManager.java
  Log:
  rolled back RegionManager enhancements
  
  Revision  Changes    Path
  1.40      +6 -25     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.39
  retrieving revision 1.40
  diff -u -b -r1.39 -r1.40
  --- RegionManager.java	30 Jul 2007 20:35:23 -0000	1.39
  +++ RegionManager.java	31 Jul 2007 16:19:36 -0000	1.40
  @@ -137,18 +137,8 @@
       */
      public Region getRegion(Fqn fqn, Region.Type type, boolean createIfAbsent)
      {
  -      // make sure we have a default region defined.
  -      Region defaultRegion = regionsRegistry.get(Fqn.ROOT);
  -      if (defaultRegion == null)
  -      {
  -         defaultRegion = new RegionImpl(Fqn.ROOT, this);
  -         regionsRegistry.put(Fqn.ROOT, defaultRegion);
  -      }
  -
         Fqn fqnToUse = fqn;
         if (DEFAULT_REGION.equals(fqnToUse)) fqnToUse = Fqn.ROOT;
  -      Region firstFound = null;
  -
         // first see if a region for this specific Fqn exists
         if (regionsRegistry.containsKey(fqnToUse))
         {
  @@ -162,10 +152,6 @@
            {
               return r;
            }
  -         if (type == Region.Type.MARSHALLING)
  -         {
  -            firstFound = r;
  -         }
         }
   
         // if not, attempt to create one ...
  @@ -209,16 +195,11 @@
               {
                  nextBestThing = r;
               }
  -            if (type == Region.Type.MARSHALLING && firstFound == null)
  -            {
  -               firstFound = r;
  -            }
            }
            if (nextFqn.isRoot()) break;
         }
   
  -      if (nextBestThing == null && firstFound == null && type == Region.Type.MARSHALLING) return defaultRegion;
  -      return (nextBestThing == null ? firstFound : nextBestThing);
  +      return nextBestThing;
      }
   
      /**
  
  
  



More information about the jboss-cvs-commits mailing list