/** * Get configuration for the given cache. * * @param name Cache name. * @return Cache configuration. */ public CacheConfiguration cacheConfiguration(String name) { assert name != null; DynamicCacheDescriptor desc = cacheDescriptor(name); if (desc == null) { if (cachesInfo.isRestarting(name)) { IgniteCacheProxyImpl<?, ?> proxy = jCacheProxies.get(name); assert proxy != null: name; proxy.internalProxy(); //should throw exception // we have procceed, try again return cacheConfiguration(name); } throw new IllegalStateException("Cache doesn't exist: " + name); } else return desc.cacheConfiguration(); }
/** * Restarts proxies of caches if they was marked as restarting. Requires external synchronization - shouldn't be * called concurrently with another caches restart. */ public void restartProxies() { for (IgniteCacheProxyImpl<?, ?> proxy : jCacheProxies.values()) { if (proxy == null) continue; GridCacheContext<?, ?> cacheCtx = sharedCtx.cacheContext(CU.cacheId(proxy.getName())); if (cacheCtx == null) continue; if (proxy.isRestarting()) { caches.get(proxy.getName()).active(true); proxy.onRestarted(cacheCtx, cacheCtx.cache()); if (cacheCtx.dataStructuresCache()) ctx.dataStructures().restart(proxy.getName(), proxy.internalProxy()); } } }
ctx.dataStructures().restart(cache.name(), proxy.internalProxy());
/** * Restarts proxies of caches if they was marked as restarting. Requires external synchronization - shouldn't be * called concurrently with another caches restart. */ public void restartProxies() { for (IgniteCacheProxyImpl<?, ?> proxy : jCacheProxies.values()) { if (proxy == null) continue; GridCacheContext<?, ?> cacheCtx = sharedCtx.cacheContext(CU.cacheId(proxy.getName())); if (cacheCtx == null) continue; if (proxy.isRestarting()) { caches.get(proxy.getName()).active(true); proxy.onRestarted(cacheCtx, cacheCtx.cache()); if (cacheCtx.dataStructuresCache()) ctx.dataStructures().restart(proxy.internalProxy()); } } }
ctx.dataStructures().restart(proxy.internalProxy());