ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [6/6] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-comm-balance-master
Date Tue, 06 Dec 2016 10:59:10 GMT
Merge remote-tracking branch 'remotes/origin/master' into ignite-comm-balance-master

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java


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

Branch: refs/heads/ignite-comm-balance-master
Commit: bd9a96746c27c43ddb01e7e108f63b8fdb2c1783
Parents: a35853e
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Dec 6 13:58:54 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Dec 6 13:58:54 2016 +0300

----------------------------------------------------------------------
 .../communication/GridIoMessageFactory.java     | 22 ++++++------
 .../communication/IgniteIoTestMessage.java      | 35 ++++++++++++++------
 .../communication/tcp/TcpCommunicationSpi.java  |  2 +-
 3 files changed, 36 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bd9a9674/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index cd506b7..0be4dcd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -170,6 +170,16 @@ public class GridIoMessageFactory implements MessageFactory {
         Message msg = null;
 
         switch (type) {
+            case -43:
+                msg = new TcpCommunicationSpi.HandshakeMessage2();
+
+                break;
+
+            case -42:
+                msg = new IgniteIoTestMessage();
+
+                break;
+
             case -41:
                 msg = new HadoopShuffleFinishResponse();
 
@@ -810,17 +820,7 @@ public class GridIoMessageFactory implements MessageFactory {
 
                 break;
 
-            case -37:
-                msg = new TcpCommunicationSpi.HandshakeMessage2();
-
-                break;
-
-            case -38:
-                msg = new IgniteIoTestMessage();
-
-                break;
-
-            // [-3..119] [124..127] [-36]- this
+            // [-3..119] [124..127] [-36..-43]- this
             // [120..123] - DR
             // [-4..-22, -30..-35] - SQL
             default:

http://git-wip-us.apache.org/repos/asf/ignite/blob/bd9a9674/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessage.java
index f0a4f91..110320d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessage.java
@@ -29,7 +29,7 @@ import java.nio.ByteBuffer;
  */
 public class IgniteIoTestMessage implements Message {
     /** */
-    private static byte FLAG_PROCESS_FROM_NIO = 1;
+    private static byte FLAG_PROC_FROM_NIO = 1;
 
     /** */
     private static final long serialVersionUID = 0L;
@@ -49,33 +49,46 @@ public class IgniteIoTestMessage implements Message {
     /**
      *
      */
-    public IgniteIoTestMessage() {
+    IgniteIoTestMessage() {
         // No-op.
     }
 
     /**
-     * @param id
-     * @param req
-     * @param payload
+     * @param id Message ID.
+     * @param req Request flag.
+     * @param payload Payload.
      */
-    public IgniteIoTestMessage(long id, boolean req, byte[] payload) {
+    IgniteIoTestMessage(long id, boolean req, byte[] payload) {
         this.id = id;
         this.req = req;
         this.payload = payload;
     }
 
-    public boolean processFromNioThread() {
-        return isFlag(FLAG_PROCESS_FROM_NIO);
+    /**
+     * @return {@code True} if message should be processed from NIO thread
+     * (otherwise message is submitted to system pool).
+     */
+    boolean processFromNioThread() {
+        return isFlag(FLAG_PROC_FROM_NIO);
     }
 
-    public void processFromNioThread(boolean processFromNioThread) {
-        setFlag(processFromNioThread, FLAG_PROCESS_FROM_NIO);
+    /**
+     * @param procFromNioThread {@code True} if message should be processed from NIO thread.
+     */
+    void processFromNioThread(boolean procFromNioThread) {
+        setFlag(procFromNioThread, FLAG_PROC_FROM_NIO);
     }
 
+    /**
+     * @param flags Flags.
+     */
     public void flags(byte flags) {
         this.flags = flags;
     }
 
+    /**
+     * @return Flags.
+     */
     public byte flags() {
         return flags;
     }
@@ -202,7 +215,7 @@ public class IgniteIoTestMessage implements Message {
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return -38;
+        return -42;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/bd9a9674/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 74d29b3..8a1864e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -4091,7 +4091,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
 
         /** {@inheritDoc} */
         @Override public byte directType() {
-            return -37;
+            return -43;
         }
 
         /** {@inheritDoc} */


Mime
View raw message