ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [24/50] incubator-ignite git commit: IGNITE-61 - Direct marshalling
Date Tue, 10 Feb 2015 12:32:07 GMT
IGNITE-61 - Direct marshalling


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

Branch: refs/heads/ignite-96
Commit: 4ef1baea4c95a42ab6744516a18919ee29b4fee0
Parents: 865c428
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Mon Feb 9 15:06:51 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Mon Feb 9 15:06:51 2015 -0800

----------------------------------------------------------------------
 .../impl/connection/GridClientConnectionManagerAdapter.java      | 2 +-
 .../processors/rest/client/message/GridClientPingPacket.java     | 4 +++-
 .../processors/rest/client/message/GridRouterResponse.java       | 2 +-
 .../processors/rest/protocols/tcp/GridTcpRestNioListener.java    | 4 ++--
 .../processors/rest/protocols/tcp/GridTcpRestParser.java         | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ef1baea/modules/core/src/main/java/org/apache/ignite/client/impl/connection/GridClientConnectionManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/client/impl/connection/GridClientConnectionManagerAdapter.java
b/modules/core/src/main/java/org/apache/ignite/client/impl/connection/GridClientConnectionManagerAdapter.java
index ff9bdf7..b689b9b 100644
--- a/modules/core/src/main/java/org/apache/ignite/client/impl/connection/GridClientConnectionManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/client/impl/connection/GridClientConnectionManagerAdapter.java
@@ -170,7 +170,7 @@ abstract class GridClientConnectionManagerAdapter implements GridClientConnectio
                     .socketReceiveBufferSize(0)
                     .socketSendBufferSize(0)
                     .idleTimeout(Long.MAX_VALUE)
-                    .gridName("gridClient")
+                    .gridName(routerClient ? "routerClient" : "gridClient")
                     .daemon(cfg.isDaemon())
                     .build();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ef1baea/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPingPacket.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPingPacket.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPingPacket.java
index fef8a8d..90235df 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPingPacket.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPingPacket.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.processors.rest.client.message;
 
+import static org.apache.ignite.internal.processors.rest.protocols.tcp.GridMemcachedMessage.*;
+
 /**
  * Fictive ping packet.
  */
@@ -28,7 +30,7 @@ public class GridClientPingPacket extends GridClientAbstractMessage {
     public static final GridClientMessage PING_MESSAGE = new GridClientPingPacket();
 
     /** Ping packet. */
-    public static final byte[] PING_PACKET = new byte[] {(byte)0x90, 0x00, 0x00, 0x00, 0x00};
+    public static final byte[] PING_PACKET = new byte[] {IGNITE_REQ_FLAG, 0x00, 0x00, 0x00,
0x00};
 
     /** {@inheritDoc} */
     @Override public String toString() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ef1baea/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridRouterResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridRouterResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridRouterResponse.java
index ce5104c..2ff3e21 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridRouterResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridRouterResponse.java
@@ -74,7 +74,7 @@ public class GridRouterResponse extends GridClientAbstractMessage {
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return "GridRoutedResponse [" +
+        return "GridRouterResponse [" +
             "clientId=" + clientId() +
             ", reqId=" + requestId() +
             ", destId=" + destinationId() +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ef1baea/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
index 159f178..ba4a2ac 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
@@ -134,8 +134,8 @@ public class GridTcpRestNioListener extends GridNioServerListenerAdapter<GridCli
         if (msg instanceof GridMemcachedMessage)
             memcachedLsnr.onMessage(ses, (GridMemcachedMessage)msg);
         else {
-            if (msg == GridClientPingPacket.PING_MESSAGE)
-                ses.send(new GridClientPingPacket());
+            if (msg instanceof GridClientPingPacket)
+                ses.send(msg);
             else if (msg instanceof GridClientHandshakeRequest) {
                 GridClientHandshakeRequest hs = (GridClientHandshakeRequest)msg;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ef1baea/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
index 03322d1..3a83d4b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
@@ -144,7 +144,7 @@ public class GridTcpRestParser implements GridNioParser {
 
         if (msg instanceof GridMemcachedMessage)
             return encodeMemcache((GridMemcachedMessage)msg);
-        else if (msg == GridClientPingPacket.PING_MESSAGE)
+        else if (msg instanceof GridClientPingPacket)
             return ByteBuffer.wrap(GridClientPingPacket.PING_PACKET);
         else if (msg instanceof GridClientHandshakeRequest) {
             byte[] bytes = ((GridClientHandshakeRequest)msg).rawBytes();


Mime
View raw message