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

Vladmir Blagojevic vladimir.blagojevic at jboss.com
Thu Jun 14 12:02:20 EDT 2007


  User: vblagojevic
  Date: 07/06/14 12:02:20

  Modified:    src/org/jboss/cache  CacheImpl.java
  Log:
  JBCACHE-1106,JBCACHE-1109
  
  Revision  Changes    Path
  1.91      +8 -15     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.90
  retrieving revision 1.91
  diff -u -b -r1.90 -r1.91
  --- CacheImpl.java	14 Jun 2007 15:30:14 -0000	1.90
  +++ CacheImpl.java	14 Jun 2007 16:02:20 -0000	1.91
  @@ -227,13 +227,14 @@
         }
      };
   
  -   private Configuration configuration = new Configuration(this);
  +   private Configuration configuration;
   
      /**
       * Constructs an uninitialized CacheImpl.
       */
      protected CacheImpl() throws Exception
      {
  +	  configuration = new Configuration(this);
         notifier = new Notifier<K, V>(this);
         regionManager = new RegionManager(this);
         cacheStatus = CacheStatus.INSTANTIATED;
  @@ -487,7 +488,7 @@
         {
            log.debug("Node " + getLocalAddress() + " fetching partial state " + stateId + " from member " + target);
            isStateSet = false;
  -         successfulTransfer = channel.getState(target, stateId, getStateFetchTimeout());
  +         successfulTransfer = channel.getState(target, stateId, configuration.getStateRetrievalTimeout());
            if (successfulTransfer)
            {
               try
  @@ -511,21 +512,13 @@
      }
   
      /**
  -    * Returns the state fetch timeout, 5 seconds past lock acquisition timeout.
  -    */
  -   private long getStateFetchTimeout()
  -   {
  -      return configuration.getLockAcquisitionTimeout() + 5000;
  -   }
  -
  -   /**
       * Lifecycle method. This is like initialize.
       *
       * @throws Exception
       */
      public void create() throws CacheException
      {
  -      if (cacheStatus.createAllowed() == false)
  +      if (!cacheStatus.createAllowed())
         {
            if (cacheStatus.needToDestroyFailedCache())
               destroy();
  @@ -691,7 +684,7 @@
       */
      public void start() throws CacheException
      {
  -      if (cacheStatus.startAllowed() == false)
  +      if (!cacheStatus.startAllowed())
         {
            if (cacheStatus.needToDestroyFailedCache())
               destroy(); // this will take us back to DESTROYED
  @@ -827,7 +820,7 @@
       */
      public void destroy()
      {
  -      if (cacheStatus.destroyAllowed() == false)
  +      if (!cacheStatus.destroyAllowed())
         {
            if (cacheStatus.needStopBeforeDestroy())
            {
  @@ -896,7 +889,7 @@
       */
      public void stop()
      {
  -      if (cacheStatus.stopAllowed() == false)
  +      if (!cacheStatus.stopAllowed())
         {
            return;
         }
  @@ -1268,7 +1261,7 @@
         long start, stop;
         isStateSet = false;
         start = System.currentTimeMillis();
  -      boolean rc = channel.getState(null, getStateFetchTimeout());
  +      boolean rc = channel.getState(null, configuration.getStateRetrievalTimeout());
         if (rc)
         {
            ml.waitForState();
  
  
  



More information about the jboss-cvs-commits mailing list