proxy.suspend();
/** * @param startTopVer Cache start version. * @param err Cache start error if any. */ void initCacheProxies(AffinityTopologyVersion startTopVer, @Nullable Throwable err) { for (GridCacheAdapter<?, ?> cache : caches.values()) { GridCacheContext<?, ?> cacheCtx = cache.context(); if (cacheCtx.startTopologyVersion().equals(startTopVer)) { if (!jCacheProxies.containsKey(cacheCtx.name())) { IgniteCacheProxyImpl<?, ?> newProxy = new IgniteCacheProxyImpl(cache.context(), cache, false); if (!cache.active()) newProxy.suspend(); addjCacheProxy(cacheCtx.name(), newProxy); } if (cacheCtx.preloader() != null) cacheCtx.preloader().onInitialExchangeComplete(err); } } }
/** * @param req Request. */ private void stopGateway(DynamicCacheChangeRequest req) { assert req.stop() : req; IgniteCacheProxyImpl<?, ?> proxy; // Break the proxy before exchange future is done. if (req.restart()) { if (DataStructuresProcessor.isDataStructureCache(req.cacheName())) ctx.dataStructures().suspend(req.cacheName()); GridCacheAdapter<?, ?> cache = caches.get(req.cacheName()); if (cache != null) cache.active(false); proxy = jCacheProxies.get(req.cacheName()); if (proxy != null) proxy.suspend(); } else { completeProxyInitialize(req.cacheName()); proxy = jCacheProxies.remove(req.cacheName()); } if (proxy != null) proxy.context0().gate().onStopped(); }
restartFut = suspend();