ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [04/50] [abbrv] ignite git commit: IGNITE-1642: Renamed events.
Date Thu, 22 Oct 2015 09:26:56 GMT
IGNITE-1642: Renamed events.


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

Branch: refs/heads/ignite-1651
Commit: 52534c33ab517981abb6356f550155bc8ae23761
Parents: 7c1ef1a
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Wed Oct 14 13:30:08 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Oct 14 13:30:08 2015 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  74 ++--
 .../Apache.Ignite.Core/Events/EventType.cs      | 344 +++++++++----------
 .../Events/EventsExample.cs                     |   4 +-
 3 files changed, 206 insertions(+), 216 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/52534c33/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
index 2c014e2..c271aa6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
@@ -104,19 +104,19 @@ namespace Apache.Ignite.Core.Tests
 
             Assert.AreEqual(0, events.GetEnabledEvents().Count);
             
-            Assert.IsFalse(EventType.EventsCache.Any(events.IsEnabled));
+            Assert.IsFalse(EventType.CacheAll.Any(events.IsEnabled));
 
-            events.EnableLocal(EventType.EventsCache);
+            events.EnableLocal(EventType.CacheAll);
 
-            Assert.AreEqual(EventType.EventsCache, events.GetEnabledEvents());
+            Assert.AreEqual(EventType.CacheAll, events.GetEnabledEvents());
 
-            Assert.IsTrue(EventType.EventsCache.All(events.IsEnabled));
+            Assert.IsTrue(EventType.CacheAll.All(events.IsEnabled));
 
-            events.EnableLocal(EventType.EventsTaskExecution);
+            events.EnableLocal(EventType.TaskExecutionAll);
 
-            events.DisableLocal(EventType.EventsCache);
+            events.DisableLocal(EventType.CacheAll);
 
-            Assert.AreEqual(EventType.EventsTaskExecution, events.GetEnabledEvents());
+            Assert.AreEqual(EventType.TaskExecutionAll, events.GetEnabledEvents());
         }
 
         /// <summary>
@@ -127,7 +127,7 @@ namespace Apache.Ignite.Core.Tests
         {
             var events = _grid1.GetEvents();
             var listener = EventsTestHelper.GetListener();
-            var eventType = EventType.EventsTaskExecution;
+            var eventType = EventType.TaskExecutionAll;
 
             events.EnableLocal(eventType);
 
@@ -136,7 +136,7 @@ namespace Apache.Ignite.Core.Tests
             CheckSend(3);  // 3 events per task * 3 grids
 
             // Check unsubscription for specific event
-            events.StopLocalListen(listener, EventType.EventTaskReduced);
+            events.StopLocalListen(listener, EventType.TaskReduced);
 
             CheckSend(2);
 
@@ -146,7 +146,7 @@ namespace Apache.Ignite.Core.Tests
             CheckNoEvent();
 
             // Check unsubscription by filter
-            events.LocalListen(listener, EventType.EventTaskReduced);
+            events.LocalListen(listener, EventType.TaskReduced);
 
             CheckSend();
 
@@ -166,7 +166,7 @@ namespace Apache.Ignite.Core.Tests
         {
             var events = _grid1.GetEvents();
             var listener = EventsTestHelper.GetListener();
-            var eventType = EventType.EventsTaskExecution;
+            var eventType = EventType.TaskExecutionAll;
 
             events.EnableLocal(eventType);
 
@@ -234,7 +234,7 @@ namespace Apache.Ignite.Core.Tests
             {
                 yield return new EventTestCase
                 {
-                    EventType = EventType.EventsCache,
+                    EventType = EventType.CacheAll,
                     EventObjectType = typeof (CacheEvent),
                     GenerateEvent = g => g.GetCache<int, int>(null).Put(1, 1),
                     VerifyEvents = (e, g) => VerifyCacheEvents(e, g),
@@ -243,7 +243,7 @@ namespace Apache.Ignite.Core.Tests
 
                 yield return new EventTestCase
                 {
-                    EventType = EventType.EventsTaskExecution,
+                    EventType = EventType.TaskExecutionAll,
                     EventObjectType = typeof (TaskEvent),
                     GenerateEvent = g => GenerateTaskEvent(g),
                     VerifyEvents = (e, g) => VerifyTaskEvents(e),
@@ -252,7 +252,7 @@ namespace Apache.Ignite.Core.Tests
 
                 yield return new EventTestCase
                 {
-                    EventType = EventType.EventsJobExecution,
+                    EventType = EventType.JobExecutionAll,
                     EventObjectType = typeof (JobEvent),
                     GenerateEvent = g => GenerateTaskEvent(g),
                     EventCount = 9
@@ -260,7 +260,7 @@ namespace Apache.Ignite.Core.Tests
                 
                 yield return new EventTestCase
                 {
-                    EventType = new[] {EventType.EventCacheQueryExecuted},
+                    EventType = new[] {EventType.CacheQueryExecuted},
                     EventObjectType = typeof (CacheQueryExecutedEvent),
                     GenerateEvent = g => GenerateCacheQueryEvent(g),
                     EventCount = 1
@@ -268,7 +268,7 @@ namespace Apache.Ignite.Core.Tests
 
                 yield return new EventTestCase
                 {
-                    EventType = new[] { EventType.EventCacheQueryObjectRead },
+                    EventType = new[] { EventType.CacheQueryObjectRead },
                     EventObjectType = typeof (CacheQueryReadEvent),
                     GenerateEvent = g => GenerateCacheQueryEvent(g),
                     EventCount = 1
@@ -284,7 +284,7 @@ namespace Apache.Ignite.Core.Tests
         {
             var events = _grid1.GetEvents();
 
-            var eventType = EventType.EventsTaskExecution;
+            var eventType = EventType.TaskExecutionAll;
 
             events.EnableLocal(eventType);
 
@@ -311,7 +311,7 @@ namespace Apache.Ignite.Core.Tests
             if (async)
                 events = events.WithAsync();
 
-            var eventType = EventType.EventsTaskExecution;
+            var eventType = EventType.TaskExecutionAll;
 
             events.EnableLocal(eventType);
 
@@ -340,27 +340,27 @@ namespace Apache.Ignite.Core.Tests
             waitTask.Wait(timeout);
 
             // Event types
-            waitTask = getWaitTask(() => events.WaitForLocal(EventType.EventTaskReduced));
+            waitTask = getWaitTask(() => events.WaitForLocal(EventType.TaskReduced));
 
             Assert.IsTrue(waitTask.Wait(timeout));
             Assert.IsInstanceOf(typeof(TaskEvent), waitTask.Result);
-            Assert.AreEqual(EventType.EventTaskReduced, waitTask.Result.Type);
+            Assert.AreEqual(EventType.TaskReduced, waitTask.Result.Type);
 
             // Filter
             waitTask = getWaitTask(() => events.WaitForLocal(
-                new EventFilter<IEvent>((g, e) => e.Type == EventType.EventTaskReduced)));
+                new EventFilter<IEvent>((g, e) => e.Type == EventType.TaskReduced)));
 
             Assert.IsTrue(waitTask.Wait(timeout));
             Assert.IsInstanceOf(typeof(TaskEvent), waitTask.Result);
-            Assert.AreEqual(EventType.EventTaskReduced, waitTask.Result.Type);
+            Assert.AreEqual(EventType.TaskReduced, waitTask.Result.Type);
 
             // Filter & types
             waitTask = getWaitTask(() => events.WaitForLocal(
-                new EventFilter<IEvent>((g, e) => e.Type == EventType.EventTaskReduced),
EventType.EventTaskReduced));
+                new EventFilter<IEvent>((g, e) => e.Type == EventType.TaskReduced),
EventType.TaskReduced));
 
             Assert.IsTrue(waitTask.Wait(timeout));
             Assert.IsInstanceOf(typeof(TaskEvent), waitTask.Result);
-            Assert.AreEqual(EventType.EventTaskReduced, waitTask.Result.Type);
+            Assert.AreEqual(EventType.TaskReduced, waitTask.Result.Type);
         }
 
         /// <summary>
@@ -374,13 +374,13 @@ namespace Apache.Ignite.Core.Tests
         {
             foreach (var g in _grids)
             {
-                g.GetEvents().EnableLocal(EventType.EventsJobExecution);
-                g.GetEvents().EnableLocal(EventType.EventsTaskExecution);
+                g.GetEvents().EnableLocal(EventType.JobExecutionAll);
+                g.GetEvents().EnableLocal(EventType.TaskExecutionAll);
             }
 
             var events = _grid1.GetEvents();
 
-            var expectedType = EventType.EventJobStarted;
+            var expectedType = EventType.JobStarted;
 
             var remoteFilter = portable 
                 ?  (IEventFilter<IEvent>) new RemoteEventPortableFilter(expectedType)

@@ -401,7 +401,7 @@ namespace Apache.Ignite.Core.Tests
 
             CheckSend(3, typeof(JobEvent), expectedType);
 
-            _grid3.GetEvents().DisableLocal(EventType.EventsJobExecution);
+            _grid3.GetEvents().DisableLocal(EventType.JobExecutionAll);
 
             CheckSend(2, typeof(JobEvent), expectedType);
 
@@ -435,11 +435,11 @@ namespace Apache.Ignite.Core.Tests
         public void TestRemoteQuery([Values(true, false)] bool async)
         {
             foreach (var g in _grids)
-                g.GetEvents().EnableLocal(EventType.EventsJobExecution);
+                g.GetEvents().EnableLocal(EventType.JobExecutionAll);
 
             var events = _grid1.GetEvents();
 
-            var eventFilter = new RemoteEventFilter(EventType.EventJobStarted);
+            var eventFilter = new RemoteEventFilter(EventType.JobStarted);
 
             var oldEvents = events.RemoteQuery(eventFilter);
 
@@ -448,7 +448,7 @@ namespace Apache.Ignite.Core.Tests
 
             GenerateTaskEvent();
 
-            var remoteQuery = events.RemoteQuery(eventFilter, EventsTestHelper.Timeout, EventType.EventsJobExecution);
+            var remoteQuery = events.RemoteQuery(eventFilter, EventsTestHelper.Timeout, EventType.JobExecutionAll);
 
             if (async)
             {
@@ -461,7 +461,7 @@ namespace Apache.Ignite.Core.Tests
 
             Assert.AreEqual(_grids.Length, qryResult.Count);
 
-            Assert.IsTrue(qryResult.All(x => x.Type == EventType.EventJobStarted));
+            Assert.IsTrue(qryResult.All(x => x.Type == EventType.JobStarted));
         }
 
         /// <summary>
@@ -577,7 +577,7 @@ namespace Apache.Ignite.Core.Tests
 
             Assert.AreEqual(locNode, evt.Node);
             Assert.AreEqual("msg", evt.Message);
-            Assert.AreEqual(EventType.EventSwapSpaceCleared, evt.Type);
+            Assert.AreEqual(EventType.SwapSpaceCleared, evt.Type);
             Assert.IsNotNullOrEmpty(evt.Name);
             Assert.AreNotEqual(Guid.Empty, evt.Id.GlobalId);
             Assert.IsTrue((evt.Timestamp - DateTime.Now).TotalSeconds < 10);
@@ -596,7 +596,7 @@ namespace Apache.Ignite.Core.Tests
             GenerateTaskEvent();
 
             EventsTestHelper.VerifyReceive(repeat, eventObjectType ?? typeof (TaskEvent),
-                eventType.Any() ? eventType : EventType.EventsTaskExecution);
+                eventType.Any() ? eventType : EventType.TaskExecutionAll);
         }
 
         /// <summary>
@@ -651,7 +651,7 @@ namespace Apache.Ignite.Core.Tests
 
             // started, reduced, finished
             Assert.AreEqual(
-                new[] {EventType.EventTaskStarted, EventType.EventTaskReduced, EventType.EventTaskFinished},
+                new[] {EventType.TaskStarted, EventType.TaskReduced, EventType.TaskFinished},
                 e.Select(x => x.Type).ToArray());
         }
 
@@ -687,12 +687,12 @@ namespace Apache.Ignite.Core.Tests
                 Assert.AreEqual(false, cacheEvent.HasOldValue);
                 Assert.AreEqual(null, cacheEvent.OldValue);
 
-                if (cacheEvent.Type == EventType.EventCacheObjectPut)
+                if (cacheEvent.Type == EventType.CacheObjectPut)
                 {
                     Assert.AreEqual(true, cacheEvent.HasNewValue);
                     Assert.AreEqual(1, cacheEvent.NewValue);
                 }
-                else if (cacheEvent.Type == EventType.EventCacheEntryCreated)
+                else if (cacheEvent.Type == EventType.CacheEntryCreated)
                 {
                     Assert.AreEqual(false, cacheEvent.HasNewValue);
                     Assert.AreEqual(null, cacheEvent.NewValue);

http://git-wip-us.apache.org/repos/asf/ignite/blob/52534c33/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventType.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventType.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventType.cs
index 1c56de2..56a1b83 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventType.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventType.cs
@@ -15,10 +15,12 @@
  * limitations under the License.
  */
 
+// ReSharper disable ConvertToConstant.Global
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedMember.Global
 namespace Apache.Ignite.Core.Events
 {
     using System.Collections.Generic;
-    using System.Diagnostics.CodeAnalysis;
     using System.Linq;
     using System.Reflection;
 
@@ -39,556 +41,544 @@ namespace Apache.Ignite.Core.Events
         /// <summary>
         /// Built-in event type: checkpoint was saved.
         /// </summary>
-        public static readonly int EventCheckpointSaved = 1;
+        public static readonly int CheckpointSaved = 1;
 
         /// <summary>
         /// Built-in event type: checkpoint was loaded.
         /// </summary>
-        public static readonly int EventCheckpointLoaded = 2;
+        public static readonly int CheckpointLoaded = 2;
 
         /// <summary>
         /// Built-in event type: checkpoint was removed. Reasons are: timeout expired, or
or it was manually removed, 
         /// or it was automatically removed by the task session.
         /// </summary>
-        public static readonly int EventCheckpointRemoved = 3;
+        public static readonly int CheckpointRemoved = 3;
 
         /// <summary>
         /// Built-in event type: node joined topology. New node has been discovered and joined
grid topology. Note that 
         /// even though a node has been discovered there could be a number of warnings in
the log. In certain 
         /// situations Ignite doesn't prevent a node from joining but prints warning messages
into the log.
         /// </summary>
-        public static readonly int EventNodeJoined = 10;
+        public static readonly int NodeJoined = 10;
 
         /// <summary>
         /// Built-in event type: node has normally left topology.
         /// </summary>
-        public static readonly int EventNodeLeft = 11;
+        public static readonly int NodeLeft = 11;
 
         /// <summary>
         /// Built-in event type: node failed. Ignite detected that node has presumably crashed
and is considered 
         /// failed.
         /// </summary>
-        public static readonly int EventNodeFailed = 12;
+        public static readonly int NodeFailed = 12;
 
         /// <summary>
         /// Built-in event type: node metrics updated. Generated when node's metrics are
updated. In most cases this 
         /// callback is invoked with every heartbeat received from a node (including local
node).
         /// </summary>
-        public static readonly int EventNodeMetricsUpdated = 13;
+        public static readonly int NodeMetricsUpdated = 13;
 
         /// <summary>
         /// Built-in event type: local node segmented. Generated when node determines that
it runs in invalid network 
         /// segment.
         /// </summary>
-        public static readonly int EventNodeSegmented = 14;
+        public static readonly int NodeSegmented = 14;
 
         /// <summary>
         /// Built-in event type: client node disconnected.
         /// </summary>
-        public static readonly int EventClientNodeDisconnected = 16;
+        public static readonly int ClientNodeDisconnected = 16;
 
         /// <summary>
         /// Built-in event type: client node reconnected.
         /// </summary>
-        public static readonly int EventClientNodeReconnected = 17;
+        public static readonly int ClientNodeReconnected = 17;
 
         /// <summary>
         /// Built-in event type: task started.
         /// </summary>
-        public static readonly int EventTaskStarted = 20;
+        public static readonly int TaskStarted = 20;
 
         /// <summary>
         /// Built-in event type: task finished. Task got finished. This event is triggered
every time a task finished 
         /// without exception.
         /// </summary>
-        public static readonly int EventTaskFinished = 21;
+        public static readonly int TaskFinished = 21;
 
         /// <summary>
         /// Built-in event type: task failed. Task failed. This event is triggered every
time a task finished with an 
         /// exception. Note that prior to this event, there could be other events recorded
specific to the failure.
         /// </summary>
-        public static readonly int EventTaskFailed = 22;
+        public static readonly int TaskFailed = 22;
 
         /// <summary>
         /// Built-in event type: task timed out.
         /// </summary>
-        public static readonly int EventTaskTimedout = 23;
+        public static readonly int TaskTimedout = 23;
 
         /// <summary>
         /// Built-in event type: task session attribute set.
         /// </summary>
-        public static readonly int EventTaskSessionAttrSet = 24;
+        public static readonly int TaskSessionAttrSet = 24;
 
         /// <summary>
         /// Built-in event type: task reduced.
         /// </summary>
-        public static readonly int EventTaskReduced = 25;
+        public static readonly int TaskReduced = 25;
 
         /// <summary>
         /// Built-in event type: Ignite job was mapped in {@link org.apache.ignite.compute.ComputeTask#map(List,
Object)} 
         /// method.
         /// </summary>
-        public static readonly int EventJobMapped = 40;
+        public static readonly int JobMapped = 40;
 
         /// <summary>
         /// Built-in event type: Ignite job result was received by {@link 
         /// org.apache.ignite.compute.ComputeTask#result(org.apache.ignite.compute.ComputeJobResult,
List)} method.
         /// </summary>
-        public static readonly int EventJobResulted = 41;
+        public static readonly int JobResulted = 41;
 
         /// <summary>
         /// Built-in event type: Ignite job failed over.
         /// </summary>
-        public static readonly int EventJobFailedOver = 43;
+        public static readonly int JobFailedOver = 43;
 
         /// <summary>
         /// Built-in event type: Ignite job started.
         /// </summary>
-        public static readonly int EventJobStarted = 44;
+        public static readonly int JobStarted = 44;
 
         /// <summary>
         /// Built-in event type: Ignite job finished. Job has successfully completed and
produced a result which from the 
         /// user perspective can still be either negative or positive.
         /// </summary>
-        public static readonly int EventJobFinished = 45;
+        public static readonly int JobFinished = 45;
 
         /// <summary>
         /// Built-in event type: Ignite job timed out.
         /// </summary>
-        public static readonly int EventJobTimedout = 46;
+        public static readonly int JobTimedout = 46;
 
         /// <summary>
         /// Built-in event type: Ignite job rejected during collision resolution.
         /// </summary>
-        public static readonly int EventJobRejected = 47;
+        public static readonly int JobRejected = 47;
 
         /// <summary>
         /// Built-in event type: Ignite job failed. Job has failed. This means that there
was some error event during job 
         /// execution and job did not produce a result.
         /// </summary>
-        public static readonly int EventJobFailed = 48;
+        public static readonly int JobFailed = 48;
         
         /// <summary>
         /// Built-in event type: Ignite job queued. Job arrived for execution and has been
queued (added to passive queue 
         /// during collision resolution).
         /// </summary>
-        public static readonly int EventJobQueued = 49;
+        public static readonly int JobQueued = 49;
 
         /// <summary>
         /// Built-in event type: Ignite job cancelled.
         /// </summary>
-        public static readonly int EventJobCancelled = 50;
+        public static readonly int JobCancelled = 50;
 
         /// <summary>
         /// Built-in event type: entry created.
         /// </summary>
-        public static readonly int EventCacheEntryCreated = 60;
+        public static readonly int CacheEntryCreated = 60;
 
         /// <summary>
         /// Built-in event type: entry destroyed.
         /// </summary>
-        public static readonly int EventCacheEntryDestroyed = 61;
+        public static readonly int CacheEntryDestroyed = 61;
 
         /// <summary>
         /// Built-in event type: entry evicted.
         /// </summary>
-        public static readonly int EventCacheEntryEvicted = 62;
+        public static readonly int CacheEntryEvicted = 62;
 
         /// <summary>
         /// Built-in event type: object put.
         /// </summary>
-        public static readonly int EventCacheObjectPut = 63;
+        public static readonly int CacheObjectPut = 63;
 
         /// <summary>
         /// Built-in event type: object read.
         /// </summary>
-        public static readonly int EventCacheObjectRead = 64;
+        public static readonly int CacheObjectRead = 64;
 
         /// <summary>
         /// Built-in event type: object removed.
         /// </summary>
-        public static readonly int EventCacheObjectRemoved = 65;
+        public static readonly int CacheObjectRemoved = 65;
 
         /// <summary>
         /// Built-in event type: object locked.
         /// </summary>
-        public static readonly int EventCacheObjectLocked = 66;
+        public static readonly int CacheObjectLocked = 66;
 
         /// <summary>
         /// Built-in event type: object unlocked.
         /// </summary>
-        public static readonly int EventCacheObjectUnlocked = 67;
+        public static readonly int CacheObjectUnlocked = 67;
 
         /// <summary>
         /// Built-in event type: cache object swapped from swap storage.
         /// </summary>
-        public static readonly int EventCacheObjectSwapped = 68;
+        public static readonly int CacheObjectSwapped = 68;
 
         /// <summary>
         /// Built-in event type: cache object unswapped from swap storage.
         /// </summary>
-        public static readonly int EventCacheObjectUnswapped = 69;
+        public static readonly int CacheObjectUnswapped = 69;
 
         /// <summary>
         /// Built-in event type: cache object was expired when reading it.
         /// </summary>
-        public static readonly int EventCacheObjectExpired = 70;
+        public static readonly int CacheObjectExpired = 70;
 
         /// <summary>
         /// Built-in event type: swap space data read.
         /// </summary>
-        public static readonly int EventSwapSpaceDataRead = 71;
+        public static readonly int SwapSpaceDataRead = 71;
 
         /// <summary>
         /// Built-in event type: swap space data stored.
         /// </summary>
-        public static readonly int EventSwapSpaceDataStored = 72;
+        public static readonly int SwapSpaceDataStored = 72;
 
         /// <summary>
         /// Built-in event type: swap space data removed.
         /// </summary>
-        public static readonly int EventSwapSpaceDataRemoved = 73;
+        public static readonly int SwapSpaceDataRemoved = 73;
 
         /// <summary>
         /// Built-in event type: swap space cleared.
         /// </summary>
-        public static readonly int EventSwapSpaceCleared = 74;
+        public static readonly int SwapSpaceCleared = 74;
 
         /// <summary>
         /// Built-in event type: swap space data evicted.
         /// </summary>
-        public static readonly int EventSwapSpaceDataEvicted = 75;
+        public static readonly int SwapSpaceDataEvicted = 75;
 
         /// <summary>
         /// Built-in event type: cache object stored in off-heap storage.
         /// </summary>
-        public static readonly int EventCacheObjectToOffheap = 76;
+        public static readonly int CacheObjectToOffheap = 76;
 
         /// <summary>
         /// Built-in event type: cache object moved from off-heap storage back into memory.
         /// </summary>
-        public static readonly int EventCacheObjectFromOffheap = 77;
+        public static readonly int CacheObjectFromOffheap = 77;
 
         /// <summary>
         /// Built-in event type: cache rebalance started.
         /// </summary>
-        public static readonly int EventCacheRebalanceStarted = 80;
+        public static readonly int CacheRebalanceStarted = 80;
 
         /// <summary>
         /// Built-in event type: cache rebalance stopped.
         /// </summary>
-        public static readonly int EventCacheRebalanceStopped = 81;
+        public static readonly int CacheRebalanceStopped = 81;
 
         /// <summary>
         /// Built-in event type: cache partition loaded.
         /// </summary>
-        public static readonly int EventCacheRebalancePartLoaded = 82;
+        public static readonly int CacheRebalancePartLoaded = 82;
 
         /// <summary>
         /// Built-in event type: cache partition unloaded.
         /// </summary>
-        public static readonly int EventCacheRebalancePartUnloaded = 83;
+        public static readonly int CacheRebalancePartUnloaded = 83;
 
         /// <summary>
         /// Built-in event type: cache entry rebalanced.
         /// </summary>
-        public static readonly int EventCacheRebalanceObjectLoaded = 84;
+        public static readonly int CacheRebalanceObjectLoaded = 84;
 
         /// <summary>
         /// Built-in event type: cache entry unloaded.
         /// </summary>
-        public static readonly int EventCacheRebalanceObjectUnloaded = 85;
+        public static readonly int CacheRebalanceObjectUnloaded = 85;
 
         /// <summary>
         /// Built-in event type: all nodes that hold partition left topology.
         /// </summary>
-        public static readonly int EventCacheRebalancePartDataLost = 86;
+        public static readonly int CacheRebalancePartDataLost = 86;
 
         /// <summary>
         /// Built-in event type: query executed.
         /// </summary>
-        public static readonly int EventCacheQueryExecuted = 96;
+        public static readonly int CacheQueryExecuted = 96;
 
         /// <summary>
         /// Built-in event type: query entry read.
         /// </summary>
-        public static readonly int EventCacheQueryObjectRead = 97;
+        public static readonly int CacheQueryObjectRead = 97;
 
         /// <summary>
         /// Built-in event type: cache started.
         /// </summary>
-        public static readonly int EventCacheStarted = 98;
+        public static readonly int CacheStarted = 98;
 
         /// <summary>
         /// Built-in event type: cache started.
         /// </summary>
-        public static readonly int EventCacheStopped = 99;
+        public static readonly int CacheStopped = 99;
 
         /// <summary>
         /// Built-in event type: cache nodes left.
         /// </summary>
-        public static readonly int EventCacheNodesLeft = 100;
+        public static readonly int CacheNodesLeft = 100;
 
         /// <summary>
         /// All events indicating an error or failure condition. It is convenient to use
when fetching all events 
         /// indicating error or failure.
         /// </summary>
-        private static readonly ICollection<int> EventsError0 = new[]
+        private static readonly ICollection<int> ErrorAll0 = new[]
         {
-            EventJobTimedout,
-            EventJobFailed,
-            EventJobFailedOver,
-            EventJobRejected,
-            EventJobCancelled,
-            EventTaskTimedout,
-            EventTaskFailed,
-            EventCacheRebalanceStarted,
-            EventCacheRebalanceStopped
+            JobTimedout,
+            JobFailed,
+            JobFailedOver,
+            JobRejected,
+            JobCancelled,
+            TaskTimedout,
+            TaskFailed,
+            CacheRebalanceStarted,
+            CacheRebalanceStopped
         }.AsReadOnly();
 
         /// <summary>
-        /// All discovery events except for <see cref="EventNodeMetricsUpdated" />.
Subscription to <see 
-        /// cref="EventNodeMetricsUpdated" /> can generate massive amount of event processing
in most cases is not 
+        /// All discovery events except for <see cref="NodeMetricsUpdated" />. Subscription
to <see 
+        /// cref="NodeMetricsUpdated" /> can generate massive amount of event processing
in most cases is not 
         /// necessary. If this event is indeed required you can subscribe to it individually
or use <see 
-        /// cref="EventsDiscoveryAll0" /> array.
+        /// cref="DiscoveryAll0" /> array.
         /// </summary>
-        private static readonly ICollection<int> EventsDiscovery0 = new[]
+        private static readonly ICollection<int> DiscoveryAllMinusMetrics0 = new[]
         {
-            EventNodeJoined,
-            EventNodeLeft,
-            EventNodeFailed,
-            EventNodeSegmented,
-            EventClientNodeDisconnected,
-            EventClientNodeReconnected
+            NodeJoined,
+            NodeLeft,
+            NodeFailed,
+            NodeSegmented,
+            ClientNodeDisconnected,
+            ClientNodeReconnected
         }.AsReadOnly();
 
         /// <summary>
         /// All discovery events.
         /// </summary>
-        private static readonly ICollection<int> EventsDiscoveryAll0 = new[]
+        private static readonly ICollection<int> DiscoveryAll0 = new[]
         {
-            EventNodeJoined,
-            EventNodeLeft,
-            EventNodeFailed,
-            EventNodeSegmented,
-            EventNodeMetricsUpdated,
-            EventClientNodeDisconnected,
-            EventClientNodeReconnected
+            NodeJoined,
+            NodeLeft,
+            NodeFailed,
+            NodeSegmented,
+            NodeMetricsUpdated,
+            ClientNodeDisconnected,
+            ClientNodeReconnected
         }.AsReadOnly();
 
         /// <summary>
         /// All Ignite job execution events.
         /// </summary>
-        private static readonly ICollection<int> EventsJobExecution0 = new[]
+        private static readonly ICollection<int> JobExecutionAll0 = new[]
         {
-            EventJobMapped,
-            EventJobResulted,
-            EventJobFailedOver,
-            EventJobStarted,
-            EventJobFinished,
-            EventJobTimedout,
-            EventJobRejected,
-            EventJobFailed,
-            EventJobQueued,
-            EventJobCancelled
+            JobMapped,
+            JobResulted,
+            JobFailedOver,
+            JobStarted,
+            JobFinished,
+            JobTimedout,
+            JobRejected,
+            JobFailed,
+            JobQueued,
+            JobCancelled
         }.AsReadOnly();
 
         /// <summary>
         /// All Ignite task execution events.
         /// </summary>
-        private static readonly ICollection<int> EventsTaskExecution0 = new[]
+        private static readonly ICollection<int> TaskExecutionAll0 = new[]
         {
-            EventTaskStarted,
-            EventTaskFinished,
-            EventTaskFailed,
-            EventTaskTimedout,
-            EventTaskSessionAttrSet,
-            EventTaskReduced
+            TaskStarted,
+            TaskFinished,
+            TaskFailed,
+            TaskTimedout,
+            TaskSessionAttrSet,
+            TaskReduced
         }.AsReadOnly();
 
         /// <summary>
         /// All cache events.
         /// </summary>
-        private static readonly ICollection<int> EventsCache0 = new[]
+        private static readonly ICollection<int> CacheAll0 = new[]
         {
-            EventCacheEntryCreated,
-            EventCacheEntryDestroyed,
-            EventCacheObjectPut,
-            EventCacheObjectRead,
-            EventCacheObjectRemoved,
-            EventCacheObjectLocked,
-            EventCacheObjectUnlocked,
-            EventCacheObjectSwapped,
-            EventCacheObjectUnswapped,
-            EventCacheObjectExpired
+            CacheEntryCreated,
+            CacheEntryDestroyed,
+            CacheObjectPut,
+            CacheObjectRead,
+            CacheObjectRemoved,
+            CacheObjectLocked,
+            CacheObjectUnlocked,
+            CacheObjectSwapped,
+            CacheObjectUnswapped,
+            CacheObjectExpired
         }.AsReadOnly();
 
         /// <summary>
         /// All cache rebalance events.
         /// </summary>
-        private static readonly ICollection<int> EventsCacheRebalance0 = new[]
+        private static readonly ICollection<int> CacheRebalanceAll0 = new[]
         {
-            EventCacheRebalanceStarted,
-            EventCacheRebalanceStopped,
-            EventCacheRebalancePartLoaded,
-            EventCacheRebalancePartUnloaded,
-            EventCacheRebalanceObjectLoaded,
-            EventCacheRebalanceObjectUnloaded,
-            EventCacheRebalancePartDataLost
+            CacheRebalanceStarted,
+            CacheRebalanceStopped,
+            CacheRebalancePartLoaded,
+            CacheRebalancePartUnloaded,
+            CacheRebalanceObjectLoaded,
+            CacheRebalanceObjectUnloaded,
+            CacheRebalancePartDataLost
         }.AsReadOnly();
 
         /// <summary>
         /// All cache lifecycle events.
         /// </summary>
-        private static readonly ICollection<int> EventsCacheLifecycle0 = new[]
+        private static readonly ICollection<int> CacheLifecycleAll0 = new[]
         {
-            EventCacheStarted,
-            EventCacheStopped,
-            EventCacheNodesLeft
+            CacheStarted,
+            CacheStopped,
+            CacheNodesLeft
         }.AsReadOnly();
 
         /// <summary>
         /// All cache query events.
         /// </summary>
-        private static readonly ICollection<int> EventsCacheQuery0 = new[]
+        private static readonly ICollection<int> CacheQueryAll0 = new[]
         {
-            EventCacheQueryExecuted,
-            EventCacheQueryObjectRead
+            CacheQueryExecuted,
+            CacheQueryObjectRead
         }.AsReadOnly();
 
         /// <summary>
         /// All swap space events.
         /// </summary>
-        private static readonly ICollection<int> EventsSwapspace0 = new[]
+        private static readonly ICollection<int> SwapspaceAll0 = new[]
         {
-            EventSwapSpaceCleared,
-            EventSwapSpaceDataRemoved,
-            EventSwapSpaceDataRead,
-            EventSwapSpaceDataStored,
-            EventSwapSpaceDataEvicted
+            SwapSpaceCleared,
+            SwapSpaceDataRemoved,
+            SwapSpaceDataRead,
+            SwapSpaceDataStored,
+            SwapSpaceDataEvicted
         }.AsReadOnly();
 
         /// <summary>
         /// All Ignite events.
         /// </summary>
-        private static readonly ICollection<int> EventsAll0 = GetAllEvents().AsReadOnly();
+        private static readonly ICollection<int> All0 = GetAllEvents().AsReadOnly();
 
         /// <summary>
         /// All Ignite events (<b>excluding</b> metric update event).
         /// </summary>
-        private static readonly ICollection<int> EventsAllMinusMetricUpdate0 =
-            EventsAll0.Where(x => x != EventNodeMetricsUpdated).ToArray().AsReadOnly();
+        private static readonly ICollection<int> AllMinusMetricUpdate0 =
+            All0.Where(x => x != NodeMetricsUpdated).ToArray().AsReadOnly();
 
         /// <summary>
         /// All events indicating an error or failure condition. It is convenient to use
when fetching all events 
         /// indicating error or failure.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsError
+        public static ICollection<int> ErrorAll
         {
-            get { return EventsError0; }
+            get { return ErrorAll0; }
         }
 
         /// <summary>
         /// All Ignite events (<b>excluding</b> metric update event).
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsAllMinusMetricUpdate
+        public static ICollection<int> AllMinusMetricUpdate
         {
-            get { return EventsAllMinusMetricUpdate0; }
+            get { return AllMinusMetricUpdate0; }
         }
 
         /// <summary>
         /// All swap space events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsSwapspace
+        public static ICollection<int> SwapspaceAll
         {
-            get { return EventsSwapspace0; }
+            get { return SwapspaceAll0; }
         }
 
         /// <summary>
         /// All cache query events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsCacheQuery
+        public static ICollection<int> CacheQueryAll
         {
-            get { return EventsCacheQuery0; }
+            get { return CacheQueryAll0; }
         }
 
         /// <summary>
         /// All cache lifecycle events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsCacheLifecycle
+        public static ICollection<int> CacheLifecycleAll
         {
-            get { return EventsCacheLifecycle0; }
+            get { return CacheLifecycleAll0; }
         }
 
         /// <summary>
         /// All cache rebalance events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsCacheRebalance
+        public static ICollection<int> CacheRebalanceAll
         {
-            get { return EventsCacheRebalance0; }
+            get { return CacheRebalanceAll0; }
         }
 
         /// <summary>
         /// All cache events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsCache
+        public static ICollection<int> CacheAll
         {
-            get { return EventsCache0; }
+            get { return CacheAll0; }
         }
 
         /// <summary>
         /// All Ignite task execution events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsTaskExecution
+        public static ICollection<int> TaskExecutionAll
         {
-            get { return EventsTaskExecution0; }
+            get { return TaskExecutionAll0; }
         }
 
         /// <summary>
         /// All Ignite job execution events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsJobExecution
+        public static ICollection<int> JobExecutionAll
         {
-            get { return EventsJobExecution0; }
+            get { return JobExecutionAll0; }
         }
 
         /// <summary>
         /// All discovery events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsDiscoveryAll
+        public static ICollection<int> DiscoveryAll
         {
-            get { return EventsDiscoveryAll0; }
+            get { return DiscoveryAll0; }
         }
 
         /// <summary>
-        /// All discovery events except for <see cref="EventNodeMetricsUpdated" />.
Subscription to <see 
-        /// cref="EventNodeMetricsUpdated" /> can generate massive amount of event processing
in most cases is not 
+        /// All discovery events except for <see cref="NodeMetricsUpdated" />. Subscription
to <see 
+        /// cref="NodeMetricsUpdated" /> can generate massive amount of event processing
in most cases is not 
         /// necessary. If this event is indeed required you can subscribe to it individually
or use <see 
-        /// cref="EventsDiscoveryAll0" /> array.
+        /// cref="DiscoveryAll0" /> array.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsDiscovery
+        public static ICollection<int> DiscoveryAllMinusMetrics
         {
-            get { return EventsDiscovery0; }
+            get { return DiscoveryAllMinusMetrics0; }
         }
 
         /// <summary>
         /// All Ignite events.
         /// </summary>
-        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
-        public static ICollection<int> EventsAll
+        public static ICollection<int> All
         {
-            get { return EventsAll0; }
+            get { return All0; }
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/52534c33/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 ed87309..c1f3035 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
@@ -63,7 +63,7 @@ namespace Apache.Ignite.Examples.Events
                 Console.WriteLine(">>> Listening for a local event...");
 
                 var listener = new LocalListener();
-                ignite.GetEvents().LocalListen(listener, EventType.EventsTaskExecution);
+                ignite.GetEvents().LocalListen(listener, EventType.TaskExecutionAll);
 
                 ExecuteTask(ignite);
 
@@ -79,7 +79,7 @@ namespace Apache.Ignite.Examples.Events
                 var remoteFilter = new RemoteFilter();
 
                 var listenId = ignite.GetEvents().RemoteListen(localListener: localListener,
-                    remoteFilter: remoteFilter, types: EventType.EventsJobExecution);
+                    remoteFilter: remoteFilter, types: EventType.JobExecutionAll);
 
                 if (listenId == null)
                     throw new InvalidOperationException("Subscription failed.");


Mime
View raw message