ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/6] incubator-ignite git commit: #IGNITE-GG-10429 Fixed client rest.
Date Wed, 17 Jun 2015 09:34:17 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-sprint-6 dc05e88c8 -> 9c0b09c58


#IGNITE-GG-10429 Fixed client rest.


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

Branch: refs/heads/ignite-sprint-6
Commit: 77855440af71299a29aef0b36627044b705724b8
Parents: d1a2150
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Wed Jun 17 09:48:03 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Wed Jun 17 09:48:03 2015 +0300

----------------------------------------------------------------------
 .../GridClientOptimizedMarshaller.java          | 20 ++++++++++++++++++++
 .../rest/protocols/tcp/GridTcpRestProtocol.java |  3 ++-
 2 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77855440/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
index 7c2bd2f..28b129e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
@@ -22,9 +22,11 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.client.marshaller.*;
 import org.apache.ignite.internal.processors.rest.client.message.*;
 import org.apache.ignite.marshaller.optimized.*;
+import org.apache.ignite.plugin.*;
 
 import java.io.*;
 import java.nio.*;
+import java.util.*;
 
 /**
  * Wrapper, that adapts {@link org.apache.ignite.marshaller.optimized.OptimizedMarshaller}
to
@@ -47,6 +49,17 @@ public class GridClientOptimizedMarshaller implements GridClientMarshaller
{
     }
 
     /**
+     * Constructor.
+     *
+     * @param plugins Plugins.
+     */
+    public GridClientOptimizedMarshaller(List<PluginProvider> plugins) {
+        opMarsh = new OptimizedMarshaller();
+
+        opMarsh.setContext(new ClientMarshallerContext(plugins));
+    }
+
+    /**
      * Constructs optimized marshaller with specific parameters.
      *
      * @param requireSer Require serializable flag.
@@ -105,6 +118,13 @@ public class GridClientOptimizedMarshaller implements GridClientMarshaller
{
             super(null);
         }
 
+        /**
+         * @param plugins Plugins.
+         */
+        public ClientMarshallerContext(List<PluginProvider> plugins) {
+            super(plugins);
+        }
+
         /** {@inheritDoc} */
         @Override protected boolean registerClassName(int id, String clsName) {
             throw new UnsupportedOperationException(clsName);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77855440/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
index 5645cf5..9b6f353 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
@@ -149,7 +149,8 @@ public class GridTcpRestProtocol extends GridRestProtocolAdapter {
 
         Map<Byte, GridClientMarshaller> marshMap = new HashMap<>();
 
-        marshMap.put(GridClientOptimizedMarshaller.ID, new GridClientOptimizedMarshaller());
+        marshMap.put(GridClientOptimizedMarshaller.ID,
+            new GridClientOptimizedMarshaller(new ArrayList<>(ctx.plugins().allProviders())));
         marshMap.put(GridClientJdkMarshaller.ID, new GridClientJdkMarshaller());
 
         lsnr.marshallers(marshMap);


Mime
View raw message