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

Brian Stansberry brian.stansberry at jboss.com
Mon Jan 29 22:20:16 EST 2007


  User: bstansberry
  Date: 07/01/29 22:20:16

  Modified:    src/org/jboss/cache   Tag: Branch_JBossCache_1_4_0
                        TreeCacheMBean.java TreeCache.java
  Log:
  [JBCACHE-955] Add LockParentForChildInsertRemove
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.35.2.2  +17 -1     JBossCache/src/org/jboss/cache/Attic/TreeCacheMBean.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Attic/TreeCacheMBean.java,v
  retrieving revision 1.35.2.1
  retrieving revision 1.35.2.2
  diff -u -b -r1.35.2.1 -r1.35.2.2
  --- TreeCacheMBean.java	3 Nov 2006 21:21:26 -0000	1.35.2.1
  +++ TreeCacheMBean.java	30 Jan 2007 03:20:16 -0000	1.35.2.2
  @@ -26,7 +26,7 @@
    *
    * @author Bela Ban
    * @author Ben Wang
  - * @version $Id: TreeCacheMBean.java,v 1.35.2.1 2006/11/03 21:21:26 bstansberry Exp $
  + * @version $Id: TreeCacheMBean.java,v 1.35.2.2 2007/01/30 03:20:16 bstansberry Exp $
    */
   public interface TreeCacheMBean extends ServiceMBean
   {
  @@ -236,6 +236,22 @@
       void setIsolationLevel(String level);
   
       /**
  +     * Gets whether inserting or removing a node requires a write lock
  +     * on the node's parent (when pessimistic locking is used.)
  +     * <p/>
  +     * The default value is <code>true</code>
  +     */
  +    boolean getLockParentForChildInsertRemove();
  +
  +    /**
  +     * Sets whether inserting or removing a node requires a write lock
  +     * on the node's parent (when pessimistic locking is used.)
  +     * <p/>
  +     * The default value is <code>true</code>
  +     */
  +    void setLockParentForChildInsertRemove(boolean lockParentForChildInsertRemove);
  +    
  +    /**
        * Returns whether or not on startup the initial state will be acquired
        * from existing members.
        *
  
  
  
  1.195.2.44 +28 -1     JBossCache/src/org/jboss/cache/Attic/TreeCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Attic/TreeCache.java,v
  retrieving revision 1.195.2.43
  retrieving revision 1.195.2.44
  diff -u -b -r1.195.2.43 -r1.195.2.44
  --- TreeCache.java	29 Jan 2007 05:24:59 -0000	1.195.2.43
  +++ TreeCache.java	30 Jan 2007 03:20:16 -0000	1.195.2.44
  @@ -99,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: TreeCache.java,v 1.195.2.43 2007/01/29 05:24:59 bstansberry Exp $
  + * @version $Id: TreeCache.java,v 1.195.2.44 2007/01/30 03:20:16 bstansberry Exp $
    *          <p/>
    * @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
    */
  @@ -276,6 +276,11 @@
      protected IsolationLevel isolationLevel = IsolationLevel.REPEATABLE_READ;
   
      /**
  +    * Require write locks on parents before adding or removing children.
  +    */
  +   protected boolean lockParentForChildInsertRemove = true;
  +   
  +   /**
       * This ThreadLocal contains an {@see InvocationContext} object, which holds
       * invocation-specific details.
       */
  @@ -1106,6 +1111,28 @@
         return isolationLevel;
      }
   
  +   /**
  +    * Gets whether inserting or removing a node requires a write lock
  +    * on the node's parent (when pessimistic locking is used.)
  +    * <p/>
  +    * The default value is <code>true</code>
  +    */
  +   public boolean getLockParentForChildInsertRemove()
  +   {
  +      return lockParentForChildInsertRemove;
  +   }
  +
  +   /**
  +    * Sets whether inserting or removing a node requires a write lock
  +    * on the node's parent (when pessimistic locking is used.)
  +    * <p/>
  +    * The default value is <code>true</code>
  +    */
  +   public void setLockParentForChildInsertRemove(boolean lockParentForChildInsertRemove)
  +   {
  +      this.lockParentForChildInsertRemove = lockParentForChildInsertRemove;
  +   }
  +
   
      public boolean getFetchStateOnStartup()
      {
  
  
  



More information about the jboss-cvs-commits mailing list