[jboss-cvs] JBoss Messaging SVN: r1687 - branches/Branch_1_0_1_SP/src/main/org/jboss/messaging/core

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Dec 2 10:36:37 EST 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-12-02 10:36:36 -0500 (Sat, 02 Dec 2006)
New Revision: 1687

Modified:
   branches/Branch_1_0_1_SP/src/main/org/jboss/messaging/core/ChannelSupport.java
Log:
minor reformatting

Modified: branches/Branch_1_0_1_SP/src/main/org/jboss/messaging/core/ChannelSupport.java
===================================================================
--- branches/Branch_1_0_1_SP/src/main/org/jboss/messaging/core/ChannelSupport.java	2006-12-02 14:14:09 UTC (rev 1686)
+++ branches/Branch_1_0_1_SP/src/main/org/jboss/messaging/core/ChannelSupport.java	2006-12-02 15:36:36 UTC (rev 1687)
@@ -53,8 +53,9 @@
  *
  * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt> $Id: ChannelSupport.java,v 1.65
- *          2006/06/27 19:44:39 timfox Exp $
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
  */
 public abstract class ChannelSupport implements Channel
 {
@@ -278,7 +279,7 @@
 
    public void cancel(Delivery d) throws Throwable
    {
-       //We put the cancellation on the event queue     
+       //We put the cancellation on the event queue
        this.executor.execute(new CancelRunnable(d));
    }
 
@@ -624,13 +625,13 @@
          // The iterator is used to iterate through the refs in the channel in the case that they
          // don't match the selectors of any receivers.
          ListIterator iter = null;
-         
+
          MessageReference ref = null;
-         
+
          while (true)
-         {           
+         {
             synchronized (refLock)
-            {              
+            {
                if (iter == null)
                {
                   ref = (MessageReference) messageRefs.peekFirst();
@@ -638,9 +639,9 @@
                else
                {
                   if (iter.hasNext())
-                  {                        
+                  {
                      ref = (MessageReference)iter.next();
-                  } 
+                  }
                   else
                   {
                      ref = null;
@@ -687,15 +688,15 @@
                      if (trace) { log.trace(this + ": no delivery returned for message" + ref + " so no receiver got the message. Delivery is now complete"); }
 
                      receiversReady = false;
-                     
+
                      return;
                   }
                   else if (!del.isSelectorAccepted())
                   {
                      // No receiver accepted the message because no selectors matched, so we create
                      // an iterator (if we haven't already created it) to iterate through the refs
-                     // in the channel. 
-                     
+                     // in the channel.
+
                      // TODO Note that this is only a partial solution since if there are messages
                      // paged to storage it won't try those - i.e. it will only iterate through
                      // those refs in memory. Dealing with refs in storage is somewhat tricky since
@@ -708,12 +709,12 @@
                      if (iter == null)
                      {
                         iter = messageRefs.iterator();
-                     }                     
+                     }
                   }
                   else
                   {
                      if (trace) { log.trace(this + ": " + del + " returned for message:" + ref); }
-                     
+
                      // Receiver accepted the reference
 
                      // We must synchronize here to cope with another race condition where message
@@ -743,7 +744,7 @@
                            }
                            else
                            {
-                              iter.remove();                                
+                              iter.remove();
                            }
 
                            // delivered
@@ -1684,11 +1685,11 @@
          }
       }
    }
-   
+
    private class CancelRunnable implements Runnable
    {
       Delivery del;
-      
+
       CancelRunnable(Delivery del)
       {
          this.del = del;




More information about the jboss-cvs-commits mailing list