ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [17/30] incubator-ignite git commit: HELPDESC-777 Add IGNITE_MBEAN_APPEND_CLASS_LOADER_ID system property.
Date Fri, 24 Jul 2015 12:50:58 GMT
HELPDESC-777 Add IGNITE_MBEAN_APPEND_CLASS_LOADER_ID system property.


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

Branch: refs/heads/master
Commit: 426479984f2f5fd972bacb3e063977a666a144ab
Parents: 8d06309
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Wed Jul 22 13:38:09 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Wed Jul 22 20:30:17 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/IgniteSystemProperties.java  | 8 ++++++++
 .../java/org/apache/ignite/internal/util/IgniteUtils.java    | 6 ++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42647998/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 40fc873..b5685b2 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -317,6 +317,14 @@ public final class IgniteSystemProperties {
     public static final String IGNITE_MBEAN_APPEND_JVM_ID = "IGNITE_MBEAN_APPEND_JVM_ID";
 
     /**
+     * If this property is set to {@code true} then Ignite will append
+     * hash code of class loader to bean name returned by {@link RuntimeMXBean#getName()}.
+     * <p>
+     * Default is {@code true}.
+     */
+    public static final String IGNITE_MBEAN_APPEND_CLASS_LOADER_ID = "IGNITE_MBEAN_APPEND_CLASS_LOADER_ID";
+
+    /**
      * Property controlling size of buffer holding last exception. Default value of {@code
1000}.
      */
     public static final String IGNITE_EXCEPTION_REGISTRY_MAX_SIZE = "IGNITE_EXCEPTION_REGISTRY_MAX_SIZE";

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42647998/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index f457d6c..6bd361f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -3997,9 +3997,11 @@ public abstract class IgniteUtils {
      * @param sb Sb.
      */
     private static void appendClassLoaderHash(SB sb) {
-        String clsLdrHash = Integer.toHexString(Ignite.class.getClassLoader().hashCode());
+        if (getBoolean(IGNITE_MBEAN_APPEND_CLASS_LOADER_ID, true)) {
+            String clsLdrHash = Integer.toHexString(Ignite.class.getClassLoader().hashCode());
 
-        sb.a("clsLdr=").a(clsLdrHash).a(',');
+            sb.a("clsLdr=").a(clsLdrHash).a(',');
+        }
     }
 
     /**


Mime
View raw message