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

Manik Surtani msurtani at jboss.com
Fri Feb 9 12:23:57 EST 2007


  User: msurtani
  Date: 07/02/09 12:23:57

  Modified:    src/org/jboss/cache       NodeSPI.java CacheSPI.java
                        Node.java CacheFactory.java FqnComparator.java
                        Cache.java
  Log:
  annotations
  
  Revision  Changes    Path
  1.16      +4 -3      JBossCache/src/org/jboss/cache/NodeSPI.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeSPI.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/NodeSPI.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- NodeSPI.java	7 Feb 2007 22:06:44 -0000	1.15
  +++ NodeSPI.java	9 Feb 2007 17:23:57 -0000	1.16
  @@ -6,6 +6,7 @@
    */
   package org.jboss.cache;
   
  +import net.jcip.annotations.ThreadSafe;
   import org.jboss.cache.lock.NodeLock;
   import org.jboss.cache.optimistic.DataVersion;
   import org.jboss.cache.transaction.GlobalTransaction;
  @@ -45,9 +46,9 @@
    * @see org.jboss.cache.CacheSPI
    * @since 2.0.0
    */
  + at ThreadSafe
   public interface NodeSPI extends Node
   {
  -
      /**
       * Returns true if the children of this node were loaded from a cache loader.
       *
  @@ -260,8 +261,8 @@
       * <p/>
       * The caller needs to ensure a proper lock has been obtained prior to calling this method, otherwise a
       *
  -    * @return true if the node was found, false otherwise
       * @param fqn of child.
  +    * @return true if the node was found, false otherwise
       * @throws org.jboss.cache.lock.LockingException
       *          if locking was not obtained
       * @see #removeChild(Fqn)
  @@ -275,8 +276,8 @@
       * <p/>
       * The caller needs to ensure a proper lock has been obtained prior to calling this method.
       *
  -    * @return true if the node was found, false otherwise
       * @param childName of child.
  +    * @return true if the node was found, false otherwise
       * @throws org.jboss.cache.lock.LockingException
       *          if locking was not obtained
       * @see #removeChild(Object)
  
  
  
  1.33      +2 -0      JBossCache/src/org/jboss/cache/CacheSPI.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheSPI.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheSPI.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -b -r1.32 -r1.33
  --- CacheSPI.java	7 Feb 2007 22:06:44 -0000	1.32
  +++ CacheSPI.java	9 Feb 2007 17:23:57 -0000	1.33
  @@ -6,6 +6,7 @@
    */
   package org.jboss.cache;
   
  +import net.jcip.annotations.ThreadSafe;
   import org.jboss.cache.buddyreplication.BuddyManager;
   import org.jboss.cache.buddyreplication.GravitateResult;
   import org.jboss.cache.interceptors.Interceptor;
  @@ -42,6 +43,7 @@
    * @see org.jboss.cache.interceptors.Interceptor
    * @since 2.0.0
    */
  + at ThreadSafe
   public interface CacheSPI extends Cache
   {
      /**
  
  
  
  1.61      +5 -2      JBossCache/src/org/jboss/cache/Node.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Node.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Node.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -b -r1.60 -r1.61
  --- Node.java	25 Jan 2007 14:12:07 -0000	1.60
  +++ Node.java	9 Feb 2007 17:23:57 -0000	1.61
  @@ -6,6 +6,8 @@
    */
   package org.jboss.cache;
   
  +import net.jcip.annotations.ThreadSafe;
  +
   import java.util.Map;
   import java.util.Set;
   
  @@ -31,6 +33,7 @@
    * @see Cache
    * @since 2.0.0
    */
  + at ThreadSafe
   public interface Node
   {
      /**
  @@ -94,16 +97,16 @@
       * <p/>
       * If you wish to remove children based on absolute {@link Fqn}s, use the {@link Cache} interface instead.
       *
  -    * @return true if the node was found and removed, false otherwise
       * @param f {@link Fqn} of the child node, relative to the current node.
  +    * @return true if the node was found and removed, false otherwise
       */
      boolean removeChild(Fqn f);
   
      /**
       * Removes a child node specified by the given name.
       *
  -    * @return true if the node was found and removed, false otherwise
       * @param childName name of the child node, directly under the current node.
  +    * @return true if the node was found and removed, false otherwise
       */
      boolean removeChild(Object childName);
   
  
  
  
  1.5       +2 -0      JBossCache/src/org/jboss/cache/CacheFactory.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- CacheFactory.java	19 Jan 2007 12:05:41 -0000	1.4
  +++ CacheFactory.java	9 Feb 2007 17:23:57 -0000	1.5
  @@ -6,6 +6,7 @@
    */
   package org.jboss.cache;
   
  +import net.jcip.annotations.ThreadSafe;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.config.ConfigurationException;
   
  @@ -33,6 +34,7 @@
    * @see org.jboss.cache.pojo.PojoCacheFactory
    * @since 2.0.0
    */
  + at ThreadSafe
   public interface CacheFactory
   {
      /**
  
  
  
  1.2       +11 -0     JBossCache/src/org/jboss/cache/FqnComparator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FqnComparator.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/FqnComparator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- FqnComparator.java	1 Jan 2007 22:12:19 -0000	1.1
  +++ FqnComparator.java	9 Feb 2007 17:23:57 -0000	1.2
  @@ -6,6 +6,8 @@
    */
   package org.jboss.cache;
   
  +import net.jcip.annotations.Immutable;
  +
   import java.util.Comparator;
   
   /**
  @@ -20,6 +22,7 @@
    * @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
    * @author Steve Woodcock (<a href="mailto:stevew at jofti.com">stevew at jofti.com</a>)
    */
  + at Immutable
   public class FqnComparator implements Comparator<Fqn>
   {
      public static final FqnComparator INSTANCE = new FqnComparator();
  @@ -57,18 +60,26 @@
            Object e1 = fqn1.get(i);
            Object e2 = fqn2.get(i);
            if (e1 == e2)
  +         {
               continue;
  +         }
            if (e1 == null)
  +         {
               return 0;
  +         }
            if (e2 == null)
  +         {
               return 1;
  +         }
            if (!e1.equals(e2))
            {
               int c = compareElements(e1, e2);
               if (c != 0)
  +            {
                  return c;
            }
         }
  +      }
   
         return s1 - s2;
      }
  
  
  
  1.25      +4 -1      JBossCache/src/org/jboss/cache/Cache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Cache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Cache.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -b -r1.24 -r1.25
  --- Cache.java	25 Jan 2007 14:12:07 -0000	1.24
  +++ Cache.java	9 Feb 2007 17:23:57 -0000	1.25
  @@ -6,6 +6,7 @@
    */
   package org.jboss.cache;
   
  +import net.jcip.annotations.ThreadSafe;
   import org.jboss.cache.config.Configuration;
   import org.jgroups.Address;
   
  @@ -76,6 +77,7 @@
    * @see CacheFactory
    * @since 2.0.0
    */
  + at ThreadSafe
   public interface Cache
   {
      /**
  @@ -193,8 +195,8 @@
      /**
       * Removes a {@link Node} indicated by absolute {@link Fqn}.
       *
  -    * @return true if the node was removed, false if the node was not found
       * @param fqn {@link Node} to remove
  +    * @return true if the node was removed, false if the node was not found
       */
      boolean removeNode(Fqn fqn);
   
  @@ -231,6 +233,7 @@
   
      /**
       * Removes a region denoted by the Fqn passed in.
  +    *
       * @param fqn of the region to remove
       * @return true if a region did exist and was removed; false otherwise.
       */
  
  
  



More information about the jboss-cvs-commits mailing list