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

Manik Surtani msurtani at jboss.com
Thu Nov 16 12:11:46 EST 2006


  User: msurtani
  Date: 06/11/16 12:11:46

  Modified:    src/org/jboss/cache/marshall  TreeCacheMarshaller200.java
  Log:
  Minor perf tweak
  
  Revision  Changes    Path
  1.10      +9 -5      JBossCache/src/org/jboss/cache/marshall/TreeCacheMarshaller200.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheMarshaller200.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/marshall/TreeCacheMarshaller200.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- TreeCacheMarshaller200.java	14 Nov 2006 19:56:09 -0000	1.9
  +++ TreeCacheMarshaller200.java	16 Nov 2006 17:11:46 -0000	1.10
  @@ -53,6 +53,8 @@
      protected static final int MAGICNUMBER_SERIALIZABLE = 100;
      protected static final int MAGICNUMBER_REF = 101;
   
  +   protected static final InactiveRegionException IRE = new InactiveRegionException("Cannot unmarshall to an inactive region");
  +
      public TreeCacheMarshaller200(RegionManager manager, boolean defaultInactive, boolean useRegionBasedMarshalling)
      {
         init(manager, defaultInactive, useRegionBasedMarshalling);
  @@ -116,15 +118,17 @@
         {
            if (!region.isActive())
            {
  -            throw new InactiveRegionException("Cannot unmarshall message for region " + fqn
  -                  + ". This region is inactive.");
  +//            throw new InactiveRegionException("Cannot unmarshall message for region " + fqn
  +//                  + ". This region is inactive.");
  +            throw IRE;
            }
         }
         else if (defaultInactive)
         {
            // No region but default inactive means region is inactive
  -         throw new InactiveRegionException("Cannot unmarshall message for region " + fqn + ". By default region " + fqn
  -               + " is inactive.");
  +//         throw new InactiveRegionException("Cannot unmarshall message for region " + fqn + ". By default region " + fqn
  +//               + " is inactive.");
  +         throw IRE;
         }
   
         return region;
  @@ -318,7 +322,7 @@
         out.writeInt(mapSize);
         if (mapSize == 0) return;
   
  -      for (Map.Entry me : (Set<Map.Entry>)map.entrySet())
  +      for (Map.Entry me : (Set<Map.Entry>) map.entrySet())
         {
            marshallObject(me.getKey(), out, refMap);
            marshallObject(me.getValue(), out, refMap);
  
  
  



More information about the jboss-cvs-commits mailing list