ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [03/15] incubator-ignite git commit: IGNITE-1172 CacheMetricsMBeans registered/unregistred on start/stop cache.
Date Wed, 05 Aug 2015 08:35:26 GMT
IGNITE-1172 CacheMetricsMBeans registered/unregistred on start/stop cache.


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

Branch: refs/heads/ignite-843
Commit: 83d7b2734db4a418e05de730d8ca9c773ba8766c
Parents: f82fb5c
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Fri Jul 31 19:27:16 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Fri Jul 31 18:33:02 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheProcessor.java     | 10 ++++++++--
 .../ignite/internal/processors/cache/GridCacheUtils.java  |  1 -
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83d7b273/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index bb87a86..77d41f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -497,6 +497,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         cleanup(cfg, cfg.getAffinityMapper(), false);
         cleanup(cfg, cctx.store().configuredStore(), false);
 
+        if (!CU.isUtilityCache(cctx.cache().name()) && !CU.isSystemCache(cctx.cache().name()))
+            cleanup(cfg, cctx.cache().name(), false);
+
         NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
 
         if (nearCfg != null)
@@ -1356,6 +1359,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             cacheCtx.cache(dht);
         }
 
+        if (!CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
+            prepare(cfg, cache.mxBean(), false);
+
         return ret;
     }
 
@@ -2940,7 +2946,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         cacheName = near ? cacheName + "-near" : cacheName;
 
         for (Class<?> itf : o.getClass().getInterfaces()) {
-            if (itf.getName().endsWith("MBean")) {
+            if (itf.getName().endsWith("MBean") || itf.getName().endsWith("MXBean")) {
                 try {
                     U.registerCacheMBean(srvr, ctx.gridName(), cacheName, o.getClass().getName(),
o,
                         (Class<Object>)itf);
@@ -2973,7 +2979,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         cacheName = near ? cacheName + "-near" : cacheName;
 
         for (Class<?> itf : o.getClass().getInterfaces()) {
-            if (itf.getName().endsWith("MBean")) {
+            if (itf.getName().endsWith("MBean") || itf.getName().endsWith("MXBean")) {
                 try {
                     srvr.unregisterMBean(U.makeCacheMBeanName(ctx.gridName(), cacheName,
o.getClass().getName()));
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83d7b273/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index f88e288..41e3896 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -57,7 +57,6 @@ import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CacheRebalanceMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 import static org.apache.ignite.internal.GridTopic.*;
-import static org.apache.ignite.internal.IgniteNodeAttributes.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*;
 
 /**


Mime
View raw message