ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [15/50] ignite git commit: wip
Date Mon, 18 Jan 2016 14:12:20 GMT
wip


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

Branch: refs/heads/ignite-2324
Commit: dc7dcd3bd8780b433149f767d74e4e6f625baa01
Parents: e43fd47
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Wed Jan 13 18:19:01 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Committed: Wed Jan 13 18:19:01 2016 +0300

----------------------------------------------------------------------
 .../Cache/Query/Continuous/ContinuousQuery.cs            |  2 +-
 .../dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs   |  2 +-
 .../Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs     |  2 +-
 .../Compute/ComputeTaskSplitAdapter.cs                   | 11 +++--------
 .../Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs |  4 +++-
 .../Apache.Ignite.Core/Events/CacheRebalancingEvent.cs   |  4 +++-
 .../dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs  |  4 +++-
 .../dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs   |  4 +++-
 .../dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs        |  8 ++++----
 9 files changed, 22 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
index dbf6c97..4623b87 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/ContinuousQuery.cs
@@ -47,8 +47,8 @@ namespace Apache.Ignite.Core.Cache.Query.Continuous
         /// <summary>
         /// Default time interval.
         /// </summary>
-        [SuppressMessage("ReSharper", "StaticMemberInGenericType")]
         [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+        // ReSharper disable once StaticMemberInGenericType
         public static readonly TimeSpan DfltTimeInterval = new TimeSpan(0);
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
index 5bbfc1c..cf1f637 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/QueryBase.cs
@@ -25,7 +25,7 @@ namespace Apache.Ignite.Core.Cache.Query
     /// </summary>
     public abstract class QueryBase
     {
-        /** Default page size. */
+        /// <summary> Default page size. </summary>
         public const int DfltPageSize = 1024;
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
index c0d58ca..1753a8b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Query/SqlFieldsQuery.cs
@@ -24,7 +24,7 @@ namespace Apache.Ignite.Core.Cache.Query
     /// </summary>
     public class SqlFieldsQuery
     {
-        /** Default page size. */
+        /// <summary> Default page size. </summary>
         public const int DfltPageSize = 1024;
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
index 14651b1..fe8f85d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
@@ -22,6 +22,7 @@ namespace Apache.Ignite.Core.Compute
     using System.Diagnostics;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
+    using Apache.Ignite.Core.Impl;
     using Apache.Ignite.Core.Impl.Compute;
 
     /// <summary>
@@ -32,11 +33,6 @@ namespace Apache.Ignite.Core.Compute
     /// </summary>
     public abstract class ComputeTaskSplitAdapter<TArg, TJobRes, TTaskRes> : ComputeTaskAdapter<TArg,
TJobRes, TTaskRes>
     {
-        /** Random generator */
-        [ThreadStatic]
-        // ReSharper disable once StaticMemberInGenericType
-        private static Random _rnd;
-
         /// <summary>
         /// This is a simplified version of <see cref="IComputeTask{A,T,R}.Map"/> method.
         /// <p/>
@@ -77,12 +73,11 @@ namespace Apache.Ignite.Core.Compute
 
             var map = new Dictionary<IComputeJob<TJobRes>, IClusterNode>(jobs.Count);
 
-            if (_rnd == null)
-                _rnd = new Random();
+            var rnd = IgniteUtils.ThreadLocalRandom;
 
             foreach (var job in jobs)
             {
-                int idx = _rnd.Next(subgrid.Count);
+                int idx = rnd.Next(subgrid.Count);
 
                 IClusterNode node = subgrid[idx];
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
index fe35793..e13a889 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheQueryExecutedEvent.cs
@@ -88,7 +88,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public string TaskName { get { return _taskName; } }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
 	        return string.Format(CultureInfo.InvariantCulture,

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
index 9a648b5..31e448f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CacheRebalancingEvent.cs
@@ -88,7 +88,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public long DiscoveryTimestamp { get { return _discoveryTimestamp; } }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
 	        return string.Format(CultureInfo.InvariantCulture,

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
index 1527341..5c85003 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/CheckpointEvent.cs
@@ -42,7 +42,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public string Key { get { return _key; } }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
             return string.Format(CultureInfo.InvariantCulture, "{0}: Key={1}", Name, Key);

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
index c4d7b8e..5c163a2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/DiscoveryEvent.cs
@@ -71,7 +71,9 @@ namespace Apache.Ignite.Core.Events
         /// </summary>
         public ICollection<IClusterNode> TopologyNodes { get { return _topologyNodes;
} }
 
-        /** <inheritDoc /> */
+        /// <summary>
+        /// Gets shortened version of ToString result.
+        /// </summary>
 	    public override string ToShortString()
 	    {
             return string.Format(CultureInfo.InvariantCulture, 

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc7dcd3b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
index 7929a5d..5fcf8d7 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs
@@ -72,10 +72,10 @@ namespace Apache.Ignite.Core.Impl
         /// <summary>
         /// Gets thread local random.
         /// </summary>
-        /// <returns>Thread local random.</returns>
-        private static Random ThreadLocalRandom()
+        /// <value>Thread local random.</value>
+        public static Random ThreadLocalRandom
         {
-            return _rnd ?? (_rnd = new Random());
+            get { return _rnd ?? (_rnd = new Random()); }
         }
 
         /// <summary>
@@ -89,7 +89,7 @@ namespace Apache.Ignite.Core.Impl
             if (cnt > 1) {
                 List<T> res = new List<T>(list);
 
-                Random rnd = ThreadLocalRandom();
+                Random rnd = ThreadLocalRandom;
 
                 while (cnt > 1)
                 {


Mime
View raw message