wip
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d8ced1c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d8ced1c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d8ced1c4 Branch: refs/heads/ignite-2977 Commit: d8ced1c43d9b6c0834ca88a81db8f229534829ac Parents: d8f9d91 Author: Pavel Tupitsyn <[email protected]> Authored: Tue Apr 12 18:10:21 2016 +0300 Committer: Pavel Tupitsyn <[email protected]> Committed: Tue Apr 12 18:10:21 2016 +0300 ---------------------------------------------------------------------- .../Common/JavaObjectFactory.cs | 21 +++++++++++++++++++- .../JavaObjects/JavaCacheEntryEventFilter.cs | 10 ++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/d8ced1c4/modules/platforms/dotnet/Apache.Ignite.Core/Common/JavaObjectFactory.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Common/JavaObjectFactory.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Common/JavaObjectFactory.cs index f50705d..2c0faac 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Common/JavaObjectFactory.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Common/JavaObjectFactory.cs @@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Common { using System.Collections.Generic; using Apache.Ignite.Core.Cache.Event; + using Apache.Ignite.Core.Impl.Common; using Apache.Ignite.Core.Impl.Common.JavaObjects; /// <summary> @@ -54,7 +55,25 @@ namespace Apache.Ignite.Core.Common public static ICacheEntryEventFilter<TK, TV> CreateCacheEntryEventFilter<TK, TV>(string className, IDictionary<string, object> properties) { - return new JavaCacheEntryEventFilter<TK, TV>(className, properties); + return new JavaCacheEntryEventFilter<TK, TV>(PlatformJavaObjectFactoryProxy.FactoryType.Default, null, + className, properties); + } + + /// <summary> + /// Creates the cache event filter that delegates to specified Java filter factory. + /// </summary> + /// <typeparam name="TK">Key type.</typeparam> + /// <typeparam name="TV">Value type.</typeparam> + /// <param name="className">Name of the factory class.</param> + /// <param name="properties">The properties to set on the Java factory object.</param> + /// <returns> + /// Cache event filter that delegates to specified Java factory class. + /// </returns> + public static ICacheEntryEventFilter<TK, TV> CreateCacheEntryEventFilterFactory<TK, TV>(string className, + IDictionary<string, object> properties) + { + return new JavaCacheEntryEventFilter<TK, TV>(PlatformJavaObjectFactoryProxy.FactoryType.User, className, + null, properties); } } } http://git-wip-us.apache.org/repos/asf/ignite/blob/d8ced1c4/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/JavaObjects/JavaCacheEntryEventFilter.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/JavaObjects/JavaCacheEntryEventFilter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/JavaObjects/JavaCacheEntryEventFilter.cs index a3d3901..56ebfca 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/JavaObjects/JavaCacheEntryEventFilter.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/JavaObjects/JavaCacheEntryEventFilter.cs @@ -35,12 +35,14 @@ namespace Apache.Ignite.Core.Impl.Common.JavaObjects } /// <summary> - /// Initializes a new instance of the <see cref="JavaCacheEntryEventFilter{TK, TV}" /> class. + /// Initializes a new instance of the <see cref="JavaCacheEntryEventFilter{TK, TV}"/> class. /// </summary> - /// <param name="className">Name of the class.</param> + /// <param name="type">The type.</param> + /// <param name="factoryClassName">Name of the factory class.</param> + /// <param name="payload">The payload.</param> /// <param name="properties">The properties.</param> - public JavaCacheEntryEventFilter(string className, IDictionary<string, object> properties) - : base(FactoryType.Default, null, className, properties) + public JavaCacheEntryEventFilter(FactoryType type, string factoryClassName, object payload, + IDictionary<string, object> properties) : base(type, factoryClassName, payload, properties) { // No-op. }
