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/9389c6e3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9389c6e3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9389c6e3 Branch: refs/heads/ignite-1093 Commit: 9389c6e3ed79e5b9800b5aec076fbfee843c38ec Parents: 83d7b27 Author: nikolay_tikhonov <ntikho...@gridgain.com> Authored: Mon Aug 3 12:12:49 2015 +0300 Committer: nikolay_tikhonov <ntikho...@gridgain.com> Committed: Mon Aug 3 12:12:49 2015 +0300 ---------------------------------------------------------------------- .../ignite/internal/processors/cache/GridCacheProcessor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9389c6e3/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 77d41f8..fc6054b 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,7 +497,8 @@ 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())) + if (cfg.isStatisticsEnabled() && !CU.isUtilityCache(cctx.cache().name()) + && !CU.isSystemCache(cctx.cache().name())) cleanup(cfg, cctx.cache().name(), false); NearCacheConfiguration nearCfg = cfg.getNearConfiguration(); @@ -1359,7 +1360,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { cacheCtx.cache(dht); } - if (!CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name())) + if (cfg.isStatisticsEnabled() && !CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name())) prepare(cfg, cache.mxBean(), false); return ret;