/** * Blocks all available gateways */ public void blockGateways() { for (IgniteCacheProxyImpl<?, ?> proxy : jCacheProxies.values()) proxy.context0().gate().onStopped(); }
/** * @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(); }
/** * @param cctx Cache context. */ private void closeCache(GridCacheContext cctx) { if (cctx.affinityNode()) { GridCacheAdapter<?, ?> cache = caches.get(cctx.name()); assert cache != null : cctx.name(); jCacheProxies.put(cctx.name(), new IgniteCacheProxyImpl(cache.context(), cache, false)); completeProxyInitialize(cctx.name()); } else { cctx.gate().onStopped(); // Do not close client cache while requests processing is in progress. sharedCtx.io().writeLock(); try { if (!cctx.affinityNode() && cctx.transactional()) sharedCtx.tm().rollbackTransactionsForCache(cctx.cacheId()); completeProxyInitialize(cctx.name()); jCacheProxies.remove(cctx.name()); stopCacheSafely(cctx); } finally { sharedCtx.io().writeUnlock(); } } }
/** * Blocks all available gateways */ public void blockGateways() { for (IgniteCacheProxy<?, ?> proxy : jCacheProxies.values()) proxy.context().gate().onStopped(); }
/** * @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.restart(); } else { completeProxyInitialize(req.cacheName()); proxy = jCacheProxies.remove(req.cacheName()); } if (proxy != null) proxy.context().gate().onStopped(); }
cctx.gate().onStopped();