You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2016/03/29 11:28:59 UTC
[5/8] ignite git commit: IGNITE-2550: .NET: Simplified examples
configuration. This closes #570.
IGNITE-2550: .NET: Simplified examples configuration. This closes #570.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fc34e51a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fc34e51a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fc34e51a
Branch: refs/heads/ignite-2630
Commit: fc34e51a265e73675ff8768526c9f22c9cd9b6fb
Parents: f17b2ae
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Tue Mar 29 10:04:30 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Mar 29 10:04:30 2016 +0300
----------------------------------------------------------------------
modules/platforms/dotnet/Apache.Ignite.sln | 5 +-
.../Compute/ClosureExample.cs | 4 +-
.../Compute/TaskExample.cs | 4 +-
.../Datagrid/ContinuousQueryExample.cs | 11 +-
.../Datagrid/DataStreamerExample.cs | 8 +-
.../Datagrid/PutGetExample.cs | 6 +-
.../Datagrid/QueryExample.cs | 20 +++-
.../Datagrid/StoreExample.cs | 16 ++-
.../Datagrid/TransactionExample.cs | 14 ++-
.../Events/EventsExample.cs | 6 +-
.../Messaging/MessagingExample.cs | 4 +-
.../Misc/LifecycleExample.cs | 2 +-
.../Services/ServicesExample.cs | 6 +-
.../Apache.Ignite.ExamplesDll.csproj | 1 +
.../Apache.Ignite.ExamplesDll/Binary/Account.cs | 1 -
.../Apache.Ignite.ExamplesDll/Binary/Address.cs | 5 +-
.../Binary/Employee.cs | 4 +
.../Binary/EmployeeKey.cs | 4 +-
.../Binary/Organization.cs | 11 +-
.../Binary/OrganizationType.cs | 3 -
.../Datagrid/EmployeeStoreFactory.cs | 38 ++++++
.../examples/Config/example-cache-query.xml | 118 -------------------
.../examples/Config/example-cache-store.xml | 59 ----------
.../dotnet/examples/Config/example-cache.xml | 87 --------------
.../dotnet/examples/Config/example-compute.xml | 70 -----------
.../dotnet/examples/Config/examples-config.xml | 98 +++++++++++++++
26 files changed, 217 insertions(+), 388 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/Apache.Ignite.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.sln b/modules/platforms/dotnet/Apache.Ignite.sln
index a28d714..12fd82b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.sln
+++ b/modules/platforms/dotnet/Apache.Ignite.sln
@@ -28,10 +28,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Apache.Ignite.sln.TeamCity.DotSettings = Apache.Ignite.sln.TeamCity.DotSettings
build.bat = build.bat
DEVNOTES.txt = DEVNOTES.txt
- examples\Config\example-cache-query.xml = examples\Config\example-cache-query.xml
- examples\Config\example-cache-store.xml = examples\Config\example-cache-store.xml
- examples\Config\example-cache.xml = examples\Config\example-cache.xml
- examples\Config\example-compute.xml = examples\Config\example-compute.xml
+ examples\Config\examples-config.xml = examples\Config\examples-config.xml
README.txt = README.txt
EndProjectSection
EndProject
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
index e1194f8..7675b7e 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
@@ -34,7 +34,7 @@ namespace Apache.Ignite.Examples.Compute
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-compute.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class ClosureExample
@@ -47,7 +47,7 @@ namespace Apache.Ignite.Examples.Compute
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-compute.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
index f0bcf13..7934e82 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
@@ -35,7 +35,7 @@ namespace Apache.Ignite.Examples.Compute
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-compute.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class TaskExample
@@ -48,7 +48,7 @@ namespace Apache.Ignite.Examples.Compute
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-compute.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
index 8dad1f4..b253b3f 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
@@ -36,11 +36,14 @@ namespace Apache.Ignite.Examples.Datagrid
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-cache.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class ContinuousQueryExample
{
+ /// <summary>Cache name.</summary>
+ private const string CacheName = "dotnet_cache_continuous_query";
+
/// <summary>
/// Runs the example.
/// </summary>
@@ -49,8 +52,8 @@ namespace Apache.Ignite.Examples.Datagrid
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-cache.xml",
- JvmOptions = new List<string> {"-Xms512m", "-Xmx512m" }
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
+ JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
using (var ignite = Ignition.Start(cfg))
@@ -58,7 +61,7 @@ namespace Apache.Ignite.Examples.Datagrid
Console.WriteLine();
Console.WriteLine(">>> Cache continuous query example started.");
- var cache = ignite.GetOrCreateCache<int, string>("cache_continuous_query");
+ var cache = ignite.GetOrCreateCache<int, string>(CacheName);
// Clean up caches on all nodes before run.
cache.Clear();
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
index 08a670f..9315f02 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
@@ -38,7 +38,7 @@ namespace Apache.Ignite.Examples.Datagrid
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-cache.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class DataStreamerExample
@@ -47,7 +47,7 @@ namespace Apache.Ignite.Examples.Datagrid
private const int EntryCount = 500000;
/// <summary>Cache name.</summary>
- private const string CacheName = "cache_data_streamer";
+ private const string CacheName = "dotnet_cache_data_streamer";
/// <summary>
/// Runs the example.
@@ -57,8 +57,8 @@ namespace Apache.Ignite.Examples.Datagrid
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-cache.xml",
- JvmOptions = new List<string> {"-Xms512m", "-Xmx512m" }
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
+ JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
using (var ignite = Ignition.Start(cfg))
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
index e2502e8..7d5ade6 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
@@ -38,13 +38,13 @@ namespace Apache.Ignite.Examples.Datagrid
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-cache.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class PutGetExample
{
/// <summary>Cache name.</summary>
- private const string CacheName = "cache_put_get";
+ private const string CacheName = "dotnet_cache_put_get";
/// <summary>
/// Runs the example.
@@ -54,7 +54,7 @@ namespace Apache.Ignite.Examples.Datagrid
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-cache.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
index 809eb65..c9166b2 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
@@ -24,6 +24,7 @@ using Apache.Ignite.Core.Cache.Query;
namespace Apache.Ignite.Examples.Datagrid
{
+ using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.ExamplesDll.Binary;
/// <summary>
@@ -38,17 +39,20 @@ namespace Apache.Ignite.Examples.Datagrid
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-cache-query.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class QueryExample
{
+ /// <summary>Cache name.</summary>
+ private const string CacheName = "dotnet_cache_query";
+
[STAThread]
public static void Main()
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-cache-query.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
@@ -57,7 +61,15 @@ namespace Apache.Ignite.Examples.Datagrid
Console.WriteLine();
Console.WriteLine(">>> Cache query example started.");
- var cache = ignite.GetCache<object, object>(null);
+ var cache = ignite.GetOrCreateCache<object, object>(new CacheConfiguration
+ {
+ Name = CacheName,
+ QueryEntities = new[]
+ {
+ new QueryEntity(typeof(int), typeof(Organization)),
+ new QueryEntity(typeof(EmployeeKey), typeof(Employee))
+ }
+ });
// Clean up caches on all nodes before run.
cache.Clear();
@@ -66,7 +78,7 @@ namespace Apache.Ignite.Examples.Datagrid
PopulateCache(cache);
// Create cache that will work with specific types.
- var employeeCache = ignite.GetCache<EmployeeKey, Employee>(null);
+ var employeeCache = ignite.GetCache<EmployeeKey, Employee>(CacheName);
// Run SQL query example.
SqlQueryExample(employeeCache);
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
index 1654b41..e3ccecc 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
@@ -22,6 +22,7 @@ using Apache.Ignite.ExamplesDll.Datagrid;
namespace Apache.Ignite.Examples.Datagrid
{
+ using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.ExamplesDll.Binary;
/// <summary>
@@ -35,11 +36,14 @@ namespace Apache.Ignite.Examples.Datagrid
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-cache-store.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
class StoreExample
{
+ /// <summary>Cache name.</summary>
+ private const string CacheName = "dotnet_cache_with_store";
+
/// <summary>
/// Runs the example.
/// </summary>
@@ -48,7 +52,7 @@ namespace Apache.Ignite.Examples.Datagrid
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-cache-store.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
@@ -57,7 +61,13 @@ namespace Apache.Ignite.Examples.Datagrid
Console.WriteLine();
Console.WriteLine(">>> Cache store example started.");
- var cache = ignite.GetCache<int, Employee>(null);
+ var cache = ignite.GetOrCreateCache<int, Employee>(new CacheConfiguration
+ {
+ Name = CacheName,
+ ReadThrough = true,
+ WriteThrough = true,
+ CacheStoreFactory = new EmployeeStoreFactory()
+ });
// Clean up caches on all nodes before run.
cache.Clear();
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
index e814f8c..2aa5fd7 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
@@ -22,6 +22,7 @@ using Apache.Ignite.Core.Transactions;
namespace Apache.Ignite.Examples.Datagrid
{
+ using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.ExamplesDll.Binary;
/// <summary>
@@ -35,11 +36,14 @@ namespace Apache.Ignite.Examples.Datagrid
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-cache.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
class TransactionExample
{
+ /// <summary>Cache name.</summary>
+ private const string CacheName = "dotnet_cache_tx";
+
/// <summary>
/// Runs the example.
/// </summary>
@@ -48,7 +52,7 @@ namespace Apache.Ignite.Examples.Datagrid
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-cache.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
@@ -57,7 +61,11 @@ namespace Apache.Ignite.Examples.Datagrid
Console.WriteLine();
Console.WriteLine(">>> Transaction example started.");
- var cache = ignite.GetCache<int, Account>("tx");
+ var cache = ignite.GetOrCreateCache<int, Account>(new CacheConfiguration
+ {
+ Name = CacheName,
+ AtomicityMode = CacheAtomicityMode.Transactional
+ });
// Clean up caches on all nodes before run.
cache.Clear();
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
index 3b068e8..f571db5 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
@@ -38,7 +38,7 @@ namespace Apache.Ignite.Examples.Events
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-compute.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class EventsExample
@@ -51,8 +51,8 @@ namespace Apache.Ignite.Examples.Events
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-compute.xml",
- JvmOptions = new List<string> {"-Xms512m", "-Xmx512m" }
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
+ JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
using (var ignite = Ignition.Start(cfg))
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
index 6438b95..0c94a7b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
@@ -29,7 +29,7 @@ namespace Apache.Ignite.Examples.Messaging
/// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
/// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder;
/// 2) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-compute.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 3) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
/// Application -> Startup object);
/// 4) Start example (F5 or Ctrl+F5).
@@ -44,7 +44,7 @@ namespace Apache.Ignite.Examples.Messaging
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-compute.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
index bba6719..3dc5820 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
@@ -50,7 +50,7 @@ namespace Apache.Ignite.Examples.Misc
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-compute.xml",
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" },
LifecycleBeans = new List<ILifecycleBean> { lifecycleExampleBean }
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
index e57774c..c6c71dd 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
@@ -33,7 +33,7 @@ namespace Apache.Ignite.Examples.Services
/// <para />
/// This example can be run with standalone Apache Ignite.NET node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\example-compute.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+ /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class ServicesExample
@@ -46,8 +46,8 @@ namespace Apache.Ignite.Examples.Services
{
var cfg = new IgniteConfiguration
{
- SpringConfigUrl = @"platforms\dotnet\examples\config\example-compute.xml",
- JvmOptions = new List<string> {"-Xms512m", "-Xmx512m"}
+ SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
+ JvmOptions = new List<string> { "-Xms512m", "-Xmx512m" }
};
using (var ignite = Ignition.Start(cfg))
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
index ccbdf4b..1cf729b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
@@ -55,6 +55,7 @@
<Compile Include="Compute\AverageSalaryTask.cs" />
<Compile Include="Compute\CharacterCountClosure.cs" />
<Compile Include="Compute\CharacterCountReducer.cs" />
+ <Compile Include="Datagrid\EmployeeStoreFactory.cs" />
<Compile Include="Datagrid\EmployeeStorePredicate.cs" />
<Compile Include="Datagrid\ContinuousQueryFilter.cs" />
<Compile Include="Datagrid\EmployeeStore.cs" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs
index f51c3c2..4d3fc35 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.ExamplesDll.Binary
/// <summary>
/// Account object. Used in transaction example.
/// </summary>
- [Serializable]
public class Account
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
index 0490f24..bb6ed7f 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.ExamplesDll.Binary
{
using System;
using Apache.Ignite.Core.Binary;
+ using Apache.Ignite.Core.Cache.Configuration;
/// <summary>
/// Address.
@@ -36,15 +37,17 @@ namespace Apache.Ignite.ExamplesDll.Binary
Street = street;
Zip = zip;
}
-
+
/// <summary>
/// Street.
/// </summary>
+ [QueryTextField]
public string Street { get; set; }
/// <summary>
/// ZIP code.
/// </summary>
+ [QuerySqlField(IsIndexed = true)]
public int Zip { get; set; }
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs
index 7d0af08..44a3f11 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs
@@ -20,6 +20,7 @@ namespace Apache.Ignite.ExamplesDll.Binary
using System;
using System.Collections.Generic;
using System.Linq;
+ using Apache.Ignite.Core.Cache.Configuration;
/// <summary>
/// Employee.
@@ -45,16 +46,19 @@ namespace Apache.Ignite.ExamplesDll.Binary
/// <summary>
/// Name.
/// </summary>
+ [QuerySqlField]
public string Name { get; set; }
/// <summary>
/// Salary.
/// </summary>
+ [QuerySqlField]
public long Salary { get; set; }
/// <summary>
/// Address.
/// </summary>
+ [QuerySqlField]
public Address Address { get; set; }
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/EmployeeKey.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/EmployeeKey.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/EmployeeKey.cs
index 16e5469..9c1d8cc 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/EmployeeKey.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/EmployeeKey.cs
@@ -17,13 +17,12 @@
namespace Apache.Ignite.ExamplesDll.Binary
{
- using System;
using Apache.Ignite.Core.Cache.Affinity;
+ using Apache.Ignite.Core.Cache.Configuration;
/// <summary>
/// Employee key. Used in query example to co-locate employees with their organizations.
/// </summary>
- [Serializable]
public class EmployeeKey
{
/// <summary>
@@ -46,6 +45,7 @@ namespace Apache.Ignite.ExamplesDll.Binary
/// Organization ID.
/// </summary>
[AffinityKeyMapped]
+ [QuerySqlField(IsIndexed = true)]
public int OrganizationId { get; private set; }
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs
index 060966a..16d4113 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs
@@ -18,22 +18,14 @@
namespace Apache.Ignite.ExamplesDll.Binary
{
using System;
+ using Apache.Ignite.Core.Cache.Configuration;
/// <summary>
/// Organization.
/// </summary>
- [Serializable]
public class Organization
{
/// <summary>
- /// Default constructor.
- /// </summary>
- public Organization()
- {
- // No-op.
- }
-
- /// <summary>
/// Constructor.
/// </summary>
/// <param name="name">Name.</param>
@@ -51,6 +43,7 @@ namespace Apache.Ignite.ExamplesDll.Binary
/// <summary>
/// Name.
/// </summary>
+ [QuerySqlField(IsIndexed = true)]
public string Name { get; set; }
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs
index 9ff0c3a..098fab9 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs
@@ -17,12 +17,9 @@
namespace Apache.Ignite.ExamplesDll.Binary
{
- using System;
-
/// <summary>
/// Organization type.
/// </summary>
- [Serializable]
public enum OrganizationType
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
new file mode 100644
index 0000000..643fc44
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.ExamplesDll.Datagrid
+{
+ using System;
+ using Apache.Ignite.Core.Cache.Store;
+ using Apache.Ignite.Core.Common;
+
+ /// <summary>
+ /// Employee store factory.
+ /// </summary>
+ [Serializable]
+ public class EmployeeStoreFactory : IFactory<ICacheStore>
+ {
+ /// <summary>
+ /// Creates an instance of the cache store.
+ /// </summary>
+ public ICacheStore CreateInstance()
+ {
+ return new EmployeeStore();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Config/example-cache-query.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Config/example-cache-query.xml b/modules/platforms/dotnet/examples/Config/example-cache-query.xml
deleted file mode 100644
index 5bc9399..0000000
--- a/modules/platforms/dotnet/examples/Config/example-cache-query.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-
- <property name="platformConfiguration">
- <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration">
- <property name="binaryConfiguration">
- <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration">
- <property name="types">
- <list>
- <value>Apache.Ignite.ExamplesDll.Binary.Account</value>
- <value>Apache.Ignite.ExamplesDll.Binary.Address</value>
- <value>Apache.Ignite.ExamplesDll.Binary.Employee</value>
- <value>Apache.Ignite.ExamplesDll.Binary.EmployeeKey</value>
- <value>Apache.Ignite.ExamplesDll.Binary.Organization</value>
- </list>
- </property>
- <property name="typesConfiguration">
- <list>
- <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryTypeConfiguration">
- <property name="typeName" value="Apache.Ignite.ExamplesDll.Binary.OrganizationType" />
- <property name="enum" value="true" />
- </bean>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
-
- <!-- Cache configurations (all properties are optional). -->
- <property name="cacheConfiguration">
- <list>
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="atomicityMode" value="ATOMIC"/>
- <property name="backups" value="1"/>
-
- <!-- Configure type metadata to enable queries. -->
- <property name="typeMetadata">
- <list>
- <bean class="org.apache.ignite.cache.CacheTypeMetadata">
- <property name="keyType" value="java.lang.Integer"/>
- <property name="valueType" value="Organization"/>
- <property name="ascendingFields">
- <map>
- <entry key="name" value="java.lang.String"/>
- </map>
- </property>
- </bean>
- <bean class="org.apache.ignite.cache.CacheTypeMetadata">
- <property name="keyType" value="EmployeeKey"/>
- <property name="valueType" value="Employee"/>
- <property name="ascendingFields">
- <map>
- <entry key="organizationId" value="java.lang.Integer"/>
- <entry key="address.zip" value="java.lang.Integer"/>
- </map>
- </property>
- <property name="queryFields">
- <map>
- <entry key="name" value="java.lang.String"/>
- <entry key="salary" value="java.lang.Long"/>
- </map>
- </property>
- <property name="textFields">
- <list>
- <value>address.street</value>
- </list>
- </property>
- </bean>
- </list>
- </property>
- </bean>
- </list>
- </property>
-
- <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="ipFinder">
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <property name="addresses">
- <list>
- <!-- In distributed environment, replace with actual host IP address. -->
- <value>127.0.0.1:47500..47501</value>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
- </bean>
-</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Config/example-cache-store.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Config/example-cache-store.xml b/modules/platforms/dotnet/examples/Config/example-cache-store.xml
deleted file mode 100644
index 2c20531..0000000
--- a/modules/platforms/dotnet/examples/Config/example-cache-store.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
- <property name="cacheConfiguration">
- <list>
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="writeThrough" value="true"/>
- <property name="readThrough" value="true"/>
- <property name="cacheStoreFactory">
- <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
- <property name="typeName" value="Apache.Ignite.ExamplesDll.Datagrid.EmployeeStore, Apache.Ignite.ExamplesDll"/>
- </bean>
- </property>
- </bean>
- </list>
- </property>
-
- <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="ipFinder">
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <property name="addresses">
- <list>
- <!-- In distributed environment, replace with actual host IP address. -->
- <value>127.0.0.1:47500..47501</value>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
- </bean>
-</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Config/example-cache.xml b/modules/platforms/dotnet/examples/Config/example-cache.xml
deleted file mode 100644
index 949f3a4..0000000
--- a/modules/platforms/dotnet/examples/Config/example-cache.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
- <property name="platformConfiguration">
- <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration">
- <property name="binaryConfiguration">
- <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration">
- <property name="types">
- <list>
- <value>Apache.Ignite.ExamplesDll.Binary.Account</value>
- <value>Apache.Ignite.ExamplesDll.Binary.Address</value>
- <value>Apache.Ignite.ExamplesDll.Binary.Employee</value>
- <value>Apache.Ignite.ExamplesDll.Binary.EmployeeKey</value>
- <value>Apache.Ignite.ExamplesDll.Binary.Organization</value>
- </list>
- </property>
- <property name="typesConfiguration">
- <list>
- <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryTypeConfiguration">
- <property name="typeName" value="Apache.Ignite.ExamplesDll.Binary.OrganizationType" />
- <property name="enum" value="true" />
- </bean>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
-
- <property name="cacheConfiguration">
- <list>
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="cache*"/>
- <property name="atomicityMode" value="ATOMIC"/>
- <property name="backups" value="1"/>
- </bean>
-
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="tx"/>
- <property name="atomicityMode" value="TRANSACTIONAL"/>
- <property name="backups" value="1"/>
- </bean>
- </list>
- </property>
-
- <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="ipFinder">
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <property name="addresses">
- <list>
- <!-- In distributed environment, replace with actual host IP address. -->
- <value>127.0.0.1:47500..47501</value>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
- </bean>
-</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Config/example-compute.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Config/example-compute.xml b/modules/platforms/dotnet/examples/Config/example-compute.xml
deleted file mode 100644
index bbc6550..0000000
--- a/modules/platforms/dotnet/examples/Config/example-compute.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
- <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="ipFinder">
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <property name="addresses">
- <list>
- <!-- In distributed environment, replace with actual host IP address. -->
- <value>127.0.0.1:47500..47501</value>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
-
- <!-- Enable task execution events for examples. -->
- <property name="includeEventTypes">
- <list>
- <!-- Task execution events -->
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_SESSION_ATTR_SET"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_REDUCED"/>
-
- <!-- Job execution events -->
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_MAPPED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_RESULTED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FAILED_OVER"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_STARTED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FINISHED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_TIMEDOUT"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_REJECTED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FAILED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_QUEUED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_CANCELLED"/>
- </list>
- </property>
- </bean>
-</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc34e51a/modules/platforms/dotnet/examples/Config/examples-config.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Config/examples-config.xml b/modules/platforms/dotnet/examples/Config/examples-config.xml
new file mode 100644
index 0000000..04e6a26
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Config/examples-config.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+ <property name="addresses">
+ <list>
+ <!-- In distributed environment, replace with actual host IP address. -->
+ <value>127.0.0.1:47500..47501</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ </property>
+
+ <!-- Configure binarizable types. -->
+ <property name="platformConfiguration">
+ <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration">
+ <property name="binaryConfiguration">
+ <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration">
+ <property name="types">
+ <list>
+ <value>Apache.Ignite.ExamplesDll.Binary.Account</value>
+ <value>Apache.Ignite.ExamplesDll.Binary.Address</value>
+ <value>Apache.Ignite.ExamplesDll.Binary.Employee</value>
+ <value>Apache.Ignite.ExamplesDll.Binary.EmployeeKey</value>
+ <value>Apache.Ignite.ExamplesDll.Binary.Organization</value>
+ </list>
+ </property>
+ <property name="typesConfiguration">
+ <list>
+ <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryTypeConfiguration">
+ <property name="typeName" value="Apache.Ignite.ExamplesDll.Binary.OrganizationType" />
+ <property name="enum" value="true" />
+ </bean>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ </property>
+
+
+ <!-- Enable task execution events for examples. -->
+ <property name="includeEventTypes">
+ <list>
+ <!-- Task execution events -->
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_SESSION_ATTR_SET"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_REDUCED"/>
+
+ <!-- Job execution events -->
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_MAPPED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_RESULTED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FAILED_OVER"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_STARTED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FINISHED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_TIMEDOUT"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_REJECTED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FAILED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_QUEUED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_CANCELLED"/>
+ </list>
+ </property>
+ </bean>
+</beans>