ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [25/50] [abbrv] incubator-ignite git commit: i-709 review
Date Wed, 13 May 2015 18:24:44 GMT
i-709 review


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c4eab3c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c4eab3c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c4eab3c2

Branch: refs/heads/ignite-836_2
Commit: c4eab3c26260ac97a4499ca6b2ec6ecb4fcf3d3b
Parents: 16a6aa0
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Fri May 8 17:13:27 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Fri May 8 17:13:27 2015 +0300

----------------------------------------------------------------------
 .../spi/discovery/tcp/TcpClientDiscoverySpi.java  | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4eab3c2/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index e0b67d0..2513298 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -85,7 +85,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
     private SocketReader sockReader;
 
     /** */
-    private boolean segmentation;
+    private boolean segmented;
 
     /** Last message ID. */
     private volatile IgniteUuid lastMsgId;
@@ -738,7 +738,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
         private Socket sock;
 
         /** */
-        private final Queue<TcpDiscoveryAbstractMessage> queue = new LinkedList<>();
+        private final Queue<TcpDiscoveryAbstractMessage> queue = new ArrayDeque<>();
 
         /**
          *
@@ -821,7 +821,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
                     }
                 }
                 catch (IgniteCheckedException e) {
-                    log.error("Failed to send message: " + msg, e);
+                    U.error(log, "Failed to send message: " + msg, e);
 
                     msg = null;
                 }
@@ -854,7 +854,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
 
         /** {@inheritDoc} */
         @Override protected void body() throws InterruptedException {
-            assert !segmentation;
+            assert !segmented;
 
             boolean success = false;
 
@@ -862,7 +862,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
                 sock = joinTopology(true);
 
                 if (sock == null) {
-                    log.error("Failed to reconnect to cluster: timeout.");
+                    U.error(log, "Failed to reconnect to cluster: timeout.");
 
                     return;
                 }
@@ -896,7 +896,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
                 }
             }
             catch (IOException | IgniteCheckedException e) {
-                log.error("Failed to reconnect", e);
+                U.error(log, "Failed to reconnect", e);
             }
             finally {
                 if (!success) {
@@ -997,7 +997,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
                                 joinLatch.countDown();
                             }
                             else {
-                                if (getSpiContext().isStopping() || segmentation)
+                                if (getSpiContext().isStopping() || segmented)
                                     leaveLatch.countDown();
                                 else {
                                     assert reconnector == null;
@@ -1015,8 +1015,8 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
                         }
                     }
                     else if (msg == SPI_RECONNECT_FAILED || msg == RECONNECT_TIMEOUT) {
-                        if (!segmentation) {
-                            segmentation = true;
+                        if (!segmented) {
+                            segmented = true;
 
                             reconnector.cancel();
                             reconnector.join();


Mime
View raw message