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

Manik Surtani msurtani at jboss.com
Tue Jan 9 22:55:40 EST 2007


  User: msurtani
  Date: 07/01/09 22:55:40

  Modified:    src/org/jboss/cache   CacheImpl.java UnversionedNode.java
  Log:
  fixed some api issues
  
  Revision  Changes    Path
  1.21      +6 -22     JBossCache/src/org/jboss/cache/CacheImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheImpl.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -b -r1.20 -r1.21
  --- CacheImpl.java	10 Jan 2007 02:03:00 -0000	1.20
  +++ CacheImpl.java	10 Jan 2007 03:55:40 -0000	1.21
  @@ -41,7 +41,6 @@
   import org.jboss.cache.optimistic.DataVersion;
   import org.jboss.cache.statetransfer.StateTransferManager;
   import org.jboss.cache.util.ExposedByteArrayOutputStream;
  -import org.jboss.cache.util.MapCopy;
   import org.jboss.util.stream.MarshalledValueInputStream;
   import org.jboss.util.stream.MarshalledValueOutputStream;
   import org.jgroups.Address;
  @@ -100,7 +99,7 @@
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
    * @author Brian Stansberry
    * @author Daniel Huang (dhuang at jboss.org)
  - * @version $Id: CacheImpl.java,v 1.20 2007/01/10 02:03:00 msurtani Exp $
  + * @version $Id: CacheImpl.java,v 1.21 2007/01/10 03:55:40 msurtani Exp $
    *          <p/>
    * @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
    */
  @@ -1338,11 +1337,6 @@
            return null;
         }
         Set keys = n.getKeysDirect();
  -      // See http://jira.jboss.com/jira/browse/JBCACHE-551
  -      if (keys == null)
  -      {
  -         return new HashSet(0);
  -      }
         return new HashSet(keys);
      }
   
  @@ -1493,14 +1487,7 @@
      public boolean exists(Fqn fqn, Object key)
      {
         NodeSPI n = findInternal(fqn, false);
  -      if (n == null)
  -      {
  -         return false;
  -      }
  -      else
  -      {
  -         return n.getKeysDirect().contains(key);
  -      }
  +      return n != null && n.getKeysDirect().contains(key);
      }
   
   
  @@ -2210,9 +2197,7 @@
         if (tx != null && create_undo_ops)
         {
            // erase and set to previous hashmap contents
  -         MethodCall undo_op = MethodCallFactory.create(MethodDeclarations.putDataEraseMethodLocal, tx, fqn,
  -                 new MapCopy(rawData),
  -                 false, true);
  +         MethodCall undo_op = MethodCallFactory.create(MethodDeclarations.putDataEraseMethodLocal, tx, fqn, rawData, false, true);
            tx_table.addUndoOperation(tx, undo_op);
         }
   
  @@ -2414,7 +2399,7 @@
         // remove subtree from parent
         if (eviction || configuration.isNodeLockingOptimistic())
         {
  -         parent_node.getChildrenMapDirect().remove(n.getFqn().getLastElement());
  +         parent_node.removeChildDirect(n.getFqn().getLastElement());
         }
         else
         {
  @@ -2576,7 +2561,7 @@
            if (!data.isEmpty())
            {
               undo_op = MethodCallFactory.create(MethodDeclarations.putDataMethodLocal,
  -                    tx, fqn, new MapCopy(data), false);
  +                    tx, fqn, data, false);
            }
         }
   
  @@ -2589,8 +2574,7 @@
            notifier.notifyNodeModified(fqn, true, CacheListener.ModificationType.REMOVE_DATA, data, true);
         }
   
  -      Map raw = n.getDataDirect();
  -      raw.clear();
  +      n.clearDataDirect();
         if (eviction)
         {
            n.setDataLoaded(false);
  
  
  
  1.15      +3 -2      JBossCache/src/org/jboss/cache/UnversionedNode.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UnversionedNode.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/UnversionedNode.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- UnversionedNode.java	10 Jan 2007 02:03:00 -0000	1.14
  +++ UnversionedNode.java	10 Jan 2007 03:55:40 -0000	1.15
  @@ -496,7 +496,8 @@
   
      public synchronized void setChildrenMapDirect(Map<Object, Node> children)
      {
  -      this.children = children;
  +      this.children().clear();
  +      this.children.putAll(children);
      }
   
      public void put(Map data)
  @@ -507,7 +508,7 @@
      public synchronized void putDirect(Map data)
      {
         if (data == null) return;
  -      data.putAll(data);
  +      this.data.putAll(data);
      }
   
      public synchronized void removeChildrenDirect()
  
  
  



More information about the jboss-cvs-commits mailing list