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

Elias Ross genman at noderunner.net
Tue Nov 21 03:57:01 EST 2006


  User: genman  
  Date: 06/11/21 03:57:01

  Modified:    src/org/jboss/cache    TransactionEntry.java TreeCache.java
                        TreeCacheProxyImpl.java
  Log:
  source code tidy and taking advatage of JDK1.5
  
  Revision  Changes    Path
  1.14      +3 -1      JBossCache/src/org/jboss/cache/TransactionEntry.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TransactionEntry.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TransactionEntry.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- TransactionEntry.java	20 Nov 2006 03:53:54 -0000	1.13
  +++ TransactionEntry.java	21 Nov 2006 08:57:01 -0000	1.14
  @@ -32,7 +32,7 @@
    * </ul>
    *
    * @author <a href="mailto:bela at jboss.org">Bela Ban</a> Apr 14, 2003
  - * @version $Revision: 1.13 $
  + * @version $Revision: 1.14 $
    */
   public class TransactionEntry {
   
  @@ -226,6 +226,8 @@
       * Posts all undo operations to the TreeCache.
       */
      public void undoOperations(CacheSPI cache) {
  +      if (log.isTraceEnabled())
  +         log.trace("undoOperations " + undo_list);
         ArrayList l;
         synchronized (undo_list) {
           l = new ArrayList(undo_list);
  
  
  
  1.285     +16 -11    JBossCache/src/org/jboss/cache/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/TreeCache.java,v
  retrieving revision 1.284
  retrieving revision 1.285
  diff -u -b -r1.284 -r1.285
  --- TreeCache.java	20 Nov 2006 23:32:49 -0000	1.284
  +++ TreeCache.java	21 Nov 2006 08:57:01 -0000	1.285
  @@ -96,7 +96,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.284 2006/11/20 23:32:49 genman Exp $
  + * @version $Id: TreeCache.java,v 1.285 2006/11/21 08:57:01 genman Exp $
    *          <p/>
    * @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
    */
  @@ -729,7 +729,8 @@
   
      protected boolean shouldFetchStateOnStartup()
      {
  -      return !configuration.isInactiveOnStartup() && buddyManager == null && (configuration.isFetchInMemoryState() || (cacheLoaderManager != null && cacheLoaderManager.isFetchPersistentState()));
  +	  boolean loaderFetch = cacheLoaderManager != null && cacheLoaderManager.isFetchPersistentState();
  +      return !configuration.isInactiveOnStartup() && buddyManager == null && (configuration.isFetchInMemoryState() || loaderFetch);
      }
   
      /**
  @@ -808,7 +809,8 @@
         determineCoordinator();
   
         // start any eviction threads.
  -      if (regionManager.isUsingEvictions()) regionManager.startEvictionThread();
  +      if (regionManager.isUsingEvictions())
  +		  regionManager.startEvictionThread();
   
         notifier.notifyCacheStarted(getCacheSPI());
         started = true;
  @@ -1818,7 +1820,8 @@
         {
            Map<Object, Node> children;
            children = root.getNodeSPI().getChildrenMap();
  -         for (Node n : children.values()) {
  +         for (Node n : children.values())
  +		 {
               ((DataNode) n).print(sb, indent);
               sb.append("\n");
            }
  @@ -1863,7 +1866,8 @@
         StringBuffer sb = new StringBuffer("\n");
         int indent = 0;
   
  -      for (Node n : root.getNodeSPI().getChildrenMap().values()) {
  +      for (Node n : root.getNodeSPI().getChildrenMap().values())
  +	  {
           n.getNodeSPI().getLock().printLockInfo(sb, indent);
           sb.append("\n");
         }
  @@ -2595,11 +2599,12 @@
            notifier.notifyNodeModified(fqn, true, n.getNodeSPI().getRawData());
         }
   
  -      getInvocationContext().getOptionOverrides().setBypassInterceptorChain(true);
  -      n.clearData();
  +      Map raw = n.getNodeSPI().getRawData();
  +      raw.clear();
         if (eviction)
         {
  -         n.put(UNINITIALIZED, null); // required by cache loader to subsequently load the element again
  +         // required by cache loader to subsequently load the element again
  +         raw.put(UNINITIALIZED, null);
         }
   
         if (sendNodeEvent)
  @@ -3581,7 +3586,7 @@
      /**
       * Returns true if transaction is ACTIVE or PREPARING, false otherwise.
       */
  -   boolean isValid(Transaction tx)
  +   private boolean isValid(Transaction tx)
      {
         if (tx == null) return false;
         int status = -1;
  @@ -3635,7 +3640,7 @@
            catch (SystemException e)
            {
            }
  -         log.warn("status is " + status + " (not ACTIVE or PREPARING); returning null)");
  +         log.warn("status is " + status + " (not ACTIVE or PREPARING); returning null)", new Throwable());
            return null;
         }
   
  @@ -3695,7 +3700,7 @@
         {
            if (t instanceof CacheException)
            {
  -            throw(CacheException) t;
  +            throw (CacheException) t;
            }
            throw new RuntimeException(t);
         }
  
  
  
  1.52      +1 -1      JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheProxyImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -b -r1.51 -r1.52
  --- TreeCacheProxyImpl.java	20 Nov 2006 03:53:54 -0000	1.51
  +++ TreeCacheProxyImpl.java	21 Nov 2006 08:57:01 -0000	1.52
  @@ -339,7 +339,7 @@
   
      public String toString()
      {
  -      return "TreeCacheProxyImpl treeCache=" + treeCache;
  +      return "TreeCacheProxyImpl treeCache=" + treeCache.toString();
      }
   
      // Node implementation
  
  
  



More information about the jboss-cvs-commits mailing list