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

Manik Surtani msurtani at jboss.com
Wed Jan 10 12:47:22 EST 2007


  User: msurtani
  Date: 07/01/10 12:47:22

  Modified:    src/org/jboss/cache/config  Option.java
  Log:
  JBCACHE-629
  
  Revision  Changes    Path
  1.13      +28 -3     JBossCache/src/org/jboss/cache/config/Option.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Option.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/Option.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- Option.java	4 Jan 2007 05:35:39 -0000	1.12
  +++ Option.java	10 Jan 2007 17:47:22 -0000	1.13
  @@ -22,10 +22,11 @@
      private boolean suppressLocking;
      private boolean forceDataGravitation;
      private boolean bypassInterceptorChain;
  +   private boolean forceWriteLock;
   
      /**
       * @since 2.0.0
  -    * @deprecated This is very kludgy and ugly.  If you need to work on a {@link Node} directly, use the XXXDirect() methods on {@link NodeSPI}.  This method will disappear before BETA1
  +    * @deprecated This is very kludgy and ugly.  If you need to work on a {@link org.jboss.cache.Node} directly, use the XXXDirect() methods on {@link org.jboss.cache.NodeSPI}.  This method will disappear before BETA1
       */
      public boolean isBypassInterceptorChain()
      {
  @@ -36,7 +37,7 @@
       * Bypasses the entire interceptor chain and talks to the cache directly.  Use with extreme care, may cause a lot of data corruption and in certain cache configurations, my cause
       * the cache not to function at all.  Intended strictly for internal use only.
       *
  -    * @deprecated This is very kludgy and ugly.  If you need to work on a {@link Node} directly, use the XXXDirect() methods on {@link NodeSPI}.  This method will disappear before BETA1
  +    * @deprecated This is very kludgy and ugly.  If you need to work on a {@link org.jboss.cache.Node} directly, use the XXXDirect() methods on {@link org.jboss.cache.NodeSPI}.  This method will disappear before BETA1
       */
      public void setBypassInterceptorChain(boolean bypassInterceptorChain)
      {
  @@ -171,7 +172,7 @@
         if (forceDataGravitation != option.forceDataGravitation) return false;
         if (suppressLocking != option.suppressLocking) return false;
         if (dataVersion != null ? !dataVersion.equals(option.dataVersion) : option.dataVersion != null) return false;
  -
  +      if (forceWriteLock != option.forceWriteLock) return false;
         return true;
      }
   
  @@ -184,6 +185,7 @@
         result = 29 * result + (suppressLocking ? 1 : 0);
         result = 29 * result + (forceDataGravitation ? 1 : 0);
         result = 29 * result + (bypassInterceptorChain ? 1 : 0);
  +      result = 29 * result + (forceWriteLock ? 0 : 1);
         return result;
      }
   
  @@ -198,5 +200,28 @@
         this.forceDataGravitation = false;
         this.suppressLocking = false;
         this.dataVersion = null;
  +      this.forceWriteLock = false;
  +   }
  +
  +   /**
  +    * Forces a write lock to be acquired on the call, regardless of whether it is a read or write.  Only applies to the {@link org.jboss.cache.interceptors.PessimisticLockInterceptor}
  +    *
  +    * @param forceWriteLock
  +    * @since 2.0.0
  +    */
  +   public void setForceWriteLock(boolean forceWriteLock)
  +   {
  +      this.forceWriteLock = forceWriteLock;
  +   }
  +
  +
  +   /**
  +    * Tests whether a write lock has been forced on the call, regardless of whether it is a read or write.  Only applies to the {@link org.jboss.cache.interceptors.PessimisticLockInterceptor}
  +    *
  +    * @since 2.0.0
  +    */
  +   public boolean isForceWriteLock()
  +   {
  +      return forceWriteLock;
      }
   }
  
  
  



More information about the jboss-cvs-commits mailing list