ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [06/13] incubator-ignite git commit: IGNITE-187 Review.
Date Tue, 10 Mar 2015 10:14:00 GMT
IGNITE-187 Review.


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

Branch: refs/heads/ignite-329
Commit: a15c96b6fade20898e65d720856479589580782b
Parents: 9cb1542
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Mar 10 15:42:13 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Mar 10 15:42:13 2015 +0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteSystemProperties.java   | 11 +++++++----
 .../java/org/apache/ignite/internal/IgniteKernal.java    |  4 ++--
 .../internal/visor/node/VisorGridConfiguration.java      |  7 +++----
 3 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a15c96b6/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 0b0d1fd..9b17de4 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -24,8 +24,8 @@ import java.lang.management.*;
 import java.util.*;
 
 /**
- * Contains constants for all system properties and environmental variables in Ignite. These
- * properties and variables can be used to affect the behavior of Ignite.
+ * Contains constants for all system properties and environmental variables in Ignite.
+ * These properties and variables can be used to affect the behavior of Ignite.
  */
 public final class IgniteSystemProperties {
     /**
@@ -477,9 +477,12 @@ public final class IgniteSystemProperties {
     }
 
     /**
-     * @return Thread safe copy of system properties.
+     * Gets snapshot of system properties.
+     * Snapshot could be used for thread safe iteration over system properties.
+     *
+     * @return Snapshot of system properties.
      */
-    public static Properties systemPropertiesSnapshot() {
+    public static Properties snapshot() {
         return (Properties)System.getProperties().clone();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a15c96b6/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 5b47c90..0385411 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -1118,7 +1118,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
         try {
             // Stick all system properties into node's attributes overwriting any
             // identical names from environment properties.
-            for (Map.Entry<Object, Object> e : systemPropertiesSnapshot().entrySet())
{
+            for (Map.Entry<Object, Object> e : snapshot().entrySet()) {
                 String key = (String)e.getKey();
 
                 if (incProps == null || U.containsStringArray(incProps, key, true) ||
@@ -1908,7 +1908,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
         assert log != null;
 
         if (log.isDebugEnabled())
-            for (Map.Entry<Object, Object> entry : systemPropertiesSnapshot().entrySet())
+            for (Map.Entry<Object, Object> entry : snapshot().entrySet())
                 log.debug("System property [" + entry.getKey() + '=' + entry.getValue() +
']');
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a15c96b6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
index 0f7ca24..d5b302e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.visor.node;
 
+import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -26,8 +27,6 @@ import org.apache.ignite.internal.visor.streamer.*;
 import java.io.*;
 import java.util.*;
 
-import static java.lang.System.*;
-import static org.apache.ignite.IgniteSystemProperties.*;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
 
 /**
@@ -117,8 +116,8 @@ public class VisorGridConfiguration implements Serializable {
         caches = VisorCacheConfiguration.list(ignite, c.getCacheConfiguration());
         igfss = VisorIgfsConfiguration.list(c.getFileSystemConfiguration());
         streamers = VisorStreamerConfiguration.list(c.getStreamerConfiguration());
-        env = new HashMap<>(getenv());
-        sysProps = systemPropertiesSnapshot();
+        env = new HashMap<>(System.getenv());
+        sysProps = IgniteSystemProperties.snapshot();
         atomic = VisorAtomicConfiguration.from(c.getAtomicConfiguration());
         txCfg = VisorTransactionConfiguration.from(c.getTransactionConfiguration());
         qryCfg = VisorQueryConfiguration.from(c.getQueryConfiguration());


Mime
View raw message