@Override
 public void setManagementEnabled(
     CacheConfig cacheConfig, String cacheNameWithPrefix, boolean enabled) {
   cacheConfig = cacheConfig != null ? cacheConfig : configs.get(cacheNameWithPrefix);
   if (cacheConfig != null) {
     final String cacheManagerName = cacheConfig.getUriString();
     cacheConfig.setManagementEnabled(enabled);
     if (enabled) {
       final CacheMXBeanImpl mxBean = new CacheMXBeanImpl(cacheConfig);
       MXBeanUtil.registerCacheObject(mxBean, cacheManagerName, cacheConfig.getName(), false);
     } else {
       MXBeanUtil.unregisterCacheObject(cacheManagerName, cacheConfig.getName(), false);
       deleteCacheStat(cacheNameWithPrefix);
     }
   }
 }
 protected AbstractBaseCacheProxy(CacheConfig cacheConfig, CacheDistributedObject delegate) {
   this.name = cacheConfig.getName();
   this.cacheConfig = cacheConfig;
   this.delegate = delegate;
   this.nodeEngine = delegate.getNodeEngine();
   this.serializationService = this.nodeEngine.getSerializationService();
   if (cacheConfig.getCacheLoaderFactory() != null) {
     final Factory<CacheLoader> cacheLoaderFactory = cacheConfig.getCacheLoaderFactory();
     cacheLoader = cacheLoaderFactory.create();
   } else {
     cacheLoader = null;
   }
   asyncListenerRegistrations = new ConcurrentHashMap<CacheEntryListenerConfiguration, String>();
   syncListenerRegistrations = new ConcurrentHashMap<CacheEntryListenerConfiguration, String>();
   syncLocks = new ConcurrentHashMap<Integer, CountDownLatch>();
 }