ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: Ignite 1924
Date Thu, 26 Nov 2015 15:20:49 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1924 cad9e7a76 -> 6d4f8562b


Ignite 1924


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

Branch: refs/heads/ignite-1924
Commit: 6d4f8562bfca3f644e5f5bcf9b861291e57d0303
Parents: cad9e7a
Author: Anton Vinogradov <av@apache.org>
Authored: Thu Nov 26 18:20:41 2015 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Thu Nov 26 18:20:41 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/nio/GridNioServer.java | 22 +++++++++++++++++---
 .../util/nio/ssl/GridNioSslHandler.java         |  1 +
 2 files changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6d4f8562/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index b258960..8758694 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -43,6 +43,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Queue;
 import java.util.Set;
+import java.util.concurrent.LinkedBlockingDeque;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
@@ -67,6 +68,7 @@ import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
 import org.apache.ignite.thread.IgniteThread;
 import org.jetbrains.annotations.Nullable;
+import org.jsr166.ConcurrentHashMap8;
 import org.jsr166.ConcurrentLinkedDeque8;
 import sun.nio.ch.*;
 
@@ -831,6 +833,8 @@ public class GridNioServer<T> {
         }
     }
 
+    public static ConcurrentHashMap8<SocketAddress, LinkedBlockingDeque<ByteBuffer>>
map = new ConcurrentHashMap8<>();
+
     /**
      * Client worker for direct mode.
      */
@@ -874,6 +878,12 @@ public class GridNioServer<T> {
             // Attempt to read off the channel.
             int cnt = sockCh.read(readBuf);
 
+//            SocketAddress adr =((SocketChannel)sockCh).getRemoteAddress();
+//
+//            if (map.get(adr)!=null) {
+//                assert map.get(adr).peek().limit() == readBuf.limit();
+//            }
+
             if (cnt == -1) {
                 U.log(log, ">>>>> Remote client closed connection: " + ses);
 
@@ -886,9 +896,9 @@ public class GridNioServer<T> {
                 return;
             }
 
-            if (gridName().endsWith("0") && (cnt == 170 )) {
-                U.log(log, ">>>>>> cnt ==" + cnt);
-            }
+//            if (gridName().endsWith("0") && (cnt == 170 )) {
+//                U.log(log, ">>>>>> cnt ==" + cnt);
+//            }
 
 
             if (log.isTraceEnabled())
@@ -1070,6 +1080,12 @@ public class GridNioServer<T> {
                     assert buf.hasRemaining();
 
                     if (!skipWrite) {
+//                        SocketAddress adr =((SocketChannel)sockCh).getRemoteAddress();
+//
+//                        map.putIfAbsent(adr, new LinkedBlockingDeque<ByteBuffer>());
+//
+//                        map.get(adr).push(buf);
+
                         int cnt = sockCh.write(buf);
 
                         if (demandMess != null) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6d4f8562/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
index 7f200b2..74818ba 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java
@@ -310,6 +310,7 @@ class GridNioSslHandler extends ReentrantLock {
 
         if (!handshakeFinished) {
             handshake();
+            U.log(log, "handshake");
         }
         else
             unwrapData();


Mime
View raw message