cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r828083 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionManager.java
Date Wed, 21 Oct 2009 16:24:11 GMT
Author: jbellis
Date: Wed Oct 21 16:24:11 2009
New Revision: 828083

URL: http://svn.apache.org/viewvc?rev=828083&view=rev
Log:
reformat whitespace.  patch by jbellis for CASSANDRA-488

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionManager.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionManager.java?rev=828083&r1=828082&r2=828083&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionManager.java
(original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionManager.java
Wed Oct 21 16:24:11 2009
@@ -66,14 +66,15 @@
 
             TcpConnection least = getLeastLoaded();
 
-            if ( (least != null && least.pending() == 0) || allConnections_.size()
== maxSize_) {
+            if ((least != null && least.pending() == 0) || allConnections_.size()
== maxSize_)
+            {
                 least.inUse_ = true;
                 incUsed();
                 return least;
             }
 
             TcpConnection connection = new TcpConnection(this, localEp_, remoteEp_);
-            if ( connection != null && !contains(connection) )
+            if (connection != null && !contains(connection))
             {
                 addToPool(connection);
                 connection.inUse_ = true;
@@ -82,7 +83,7 @@
             }
             else
             {
-                if ( connection != null )
+                if (connection != null)
                 {
                     connection.closeSocket();
                 }
@@ -102,7 +103,7 @@
         try
         {
             Collections.sort(allConnections_);
-            connection = (allConnections_.size() > 0 ) ? allConnections_.get(0) : null;
+            connection = (allConnections_.size() > 0) ? allConnections_.get(0) : null;
         }
         finally
         {
@@ -144,10 +145,10 @@
         lock_.lock();
         try
         {
-            if ( contains(connection) )
+            if (contains(connection))
                 return;
 
-            if ( allConnections_.size() < maxSize_ )
+            if (allConnections_.size() < maxSize_)
             {
                 allConnections_.add(connection);
             }
@@ -167,7 +168,7 @@
         lock_.lock();
         try
         {
-            while ( allConnections_.size() > 0 )
+            while (allConnections_.size() > 0)
             {
                 TcpConnection connection = allConnections_.remove(0);
                 connection.closeSocket();
@@ -209,7 +210,7 @@
         lock_.lock();
         try
         {
-            for ( TcpConnection connection : allConnections_ )
+            for (TcpConnection connection : allConnections_)
             {
                 total += connection.pending();
             }



Mime
View raw message