Repository: ignite
Updated Branches:
  refs/heads/ignite-2977 6f48cdfcb -> 8f7247174


wip


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

Branch: refs/heads/ignite-2977
Commit: 45effb06f25b541ce2373441346ffc25be1f05cb
Parents: a2883d9
Author: Pavel Tupitsyn <[email protected]>
Authored: Tue Apr 12 15:57:21 2016 +0300
Committer: Pavel Tupitsyn <[email protected]>
Committed: Tue Apr 12 15:57:21 2016 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Core/Impl/Binary/Marshaller.cs   |  3 ---
 .../Query/Continuous/ContinuousQueryHandleImpl.cs  | 17 ++++++++++++++---
 .../Impl/Common/PlatformJavaObjectFactoryProxy.cs  | 15 +++++++++++----
 3 files changed, 25 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/45effb06/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
index 8754515..00be127 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
@@ -368,9 +368,6 @@ namespace Apache.Ignite.Core.Impl.Binary
         {
             IBinaryTypeDescriptor desc;
 
-            if (type.BaseType == typeof (PlatformJavaObjectFactoryProxy))
-                type = type.BaseType;
-
             _typeToDesc.TryGetValue(type, out desc);
 
             return desc;

http://git-wip-us.apache.org/repos/asf/ignite/blob/45effb06/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
index bbc2dbe..6cfbe92 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
@@ -26,6 +26,7 @@ namespace Apache.Ignite.Core.Impl.Cache.Query.Continuous
     using Apache.Ignite.Core.Cache.Query.Continuous;
     using Apache.Ignite.Core.Impl.Binary;
     using Apache.Ignite.Core.Impl.Binary.IO;
+    using Apache.Ignite.Core.Impl.Common;
     using Apache.Ignite.Core.Impl.Resource;
     using Apache.Ignite.Core.Impl.Unmanaged;
     using UU = Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils;
@@ -111,10 +112,20 @@ namespace Apache.Ignite.Core.Impl.Cache.Query.Continuous
             writer.WriteBoolean(qry.Local);
             writer.WriteBoolean(_filter != null);
 
-            var filterHolder = _filter == null || qry.Local ? null :
-                new ContinuousQueryFilterHolder(_filter, _keepBinary);
+            var javaFilter = _filter as PlatformJavaObjectFactoryProxy;
 
-            writer.WriteObject(filterHolder);
+            if (javaFilter != null)
+            {
+                writer.WriteObject(javaFilter.GetRawProxy());
+            }
+            else
+            {
+                var filterHolder = _filter == null || qry.Local
+                    ? null
+                    : new ContinuousQueryFilterHolder(_filter, _keepBinary);
+
+                writer.WriteObject(filterHolder);
+            }
 
             writer.WriteInt(qry.BufferSize);
             writer.WriteLong((long)qry.TimeInterval.TotalMilliseconds);

http://git-wip-us.apache.org/repos/asf/ignite/blob/45effb06/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/PlatformJavaObjectFactoryProxy.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/PlatformJavaObjectFactoryProxy.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/PlatformJavaObjectFactoryProxy.cs
index 7716e3f..ef21609 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/PlatformJavaObjectFactoryProxy.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/PlatformJavaObjectFactoryProxy.cs
@@ -18,7 +18,6 @@
 namespace Apache.Ignite.Core.Impl.Common
 {
     using System;
-    using System.Diagnostics;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Impl.Binary;
 
@@ -37,7 +36,7 @@ namespace Apache.Ignite.Core.Impl.Common
         }
 
         /** Type code. */
-        private readonly int _factoryType;
+        private readonly FactoryType _factoryType;
 
         /** Java class name */
         private readonly string _factoryClassName;
@@ -53,7 +52,7 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <param name="payload">The payload.</param>
         protected PlatformJavaObjectFactoryProxy(FactoryType type, string 
factoryClassName, object payload)
         {
-            _factoryType = (int) type;
+            _factoryType = type;
             _factoryClassName = factoryClassName;
             _payload = payload;
         }
@@ -71,11 +70,19 @@ namespace Apache.Ignite.Core.Impl.Common
         {
             var w = writer.GetRawWriter();
 
-            w.WriteInt(_factoryType);
+            w.WriteInt((int) _factoryType);
             w.WriteString(_factoryClassName);
             w.WriteObject(_payload);
 
             w.WriteInt(0);  // TODO: Properties
         }
+
+        /// <summary>
+        /// Gets the raw proxy (not the derived type) for serialization.
+        /// </summary>
+        public PlatformJavaObjectFactoryProxy GetRawProxy()
+        {
+            return new PlatformJavaObjectFactoryProxy(_factoryType, 
_factoryClassName, _payload);
+        }
     }
 }

Reply via email to