/** {@inheritDoc} */ @Override public CacheMetricsMXBean localMxBean() { return delegate.get().localMxBean(); }
/** {@inheritDoc} */ @Override public CacheMetricsMXBean localMxBean() { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.localMxBean(); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override protected Void run(VisorCacheResetMetricsTaskArg arg) { IgniteInternalCache cache = ignite.cachex(arg.getCacheName()); if (cache != null) cache.localMxBean().clear(); return null; }
/** * Cache statistics clear message received. * * @param msg Message. */ private void onCacheStatisticsClear(CacheStatisticsClearMessage msg) { assert msg != null; if (msg.initial()) { EnableStatisticsFuture fut = manageStatisticsFuts.get(msg.requestId()); if (fut != null && !cacheNames().containsAll(msg.caches())) { fut.onDone(new IgniteCheckedException("One or more cache descriptors not found [caches=" + caches + ']')); return; } for (String cacheName : msg.caches()) { IgniteInternalCache<?, ?> cache = ctx.cache().cache(cacheName); if (cache != null) cache.localMxBean().clear(); else log.warning("Failed to clear cache statistics, cache not found [cacheName=" + cacheName + ']'); } } else { EnableStatisticsFuture fut = manageStatisticsFuts.get(msg.requestId()); if (fut != null) fut.onDone(); } }
/** {@inheritDoc} */ @Override public CacheMetricsMXBean localMxBean() { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.localMxBean(); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override protected Void run(VisorCacheResetMetricsTaskArg arg) { IgniteInternalCache cache = ignite.cachex(arg.getCacheName()); if (cache != null) cache.localMxBean().clear(); return null; }
/** * Cache statistics clear message received. * * @param msg Message. */ private void onCacheStatisticsClear(CacheStatisticsClearMessage msg) { assert msg != null; if (msg.initial()) { EnableStatisticsFuture fut = manageStatisticsFuts.get(msg.requestId()); if (fut != null && !cacheNames().containsAll(msg.caches())) { fut.onDone(new IgniteCheckedException("One or more cache descriptors not found [caches=" + caches + ']')); return; } for (String cacheName : msg.caches()) { IgniteInternalCache<?, ?> cache = ctx.cache().cache(cacheName); if (cache != null) cache.localMxBean().clear(); else log.warning("Failed to clear cache statistics, cache not found [cacheName=" + cacheName + ']'); } } else { EnableStatisticsFuture fut = manageStatisticsFuts.get(msg.requestId()); if (fut != null) fut.onDone(); } }