/** * @return All configured public cache instances. */ public Collection<IgniteCacheProxy<?, ?>> publicCaches() { Collection<IgniteCacheProxy<?, ?>> res = new ArrayList<>(jCacheProxies.size()); for (IgniteCacheProxyImpl<?, ?> proxy : jCacheProxies.values()) { if (proxy.context().userCache()) res.add(proxy.gatewayWrapper()); } return res; }
/** * @param cache Cache. * @param nodes Nodes. */ private List<List<ClusterNode>> calcAffinity(IgniteCache<?, ?> cache, List<ClusterNode> nodes) { IgniteCacheProxyImpl proxy = cache.unwrap(IgniteCacheProxyImpl.class); GridCacheContext<?, ?> cctx = proxy.context(); AffinityFunction func = cctx.config().getAffinity(); AffinityFunctionContext ctx = new GridAffinityFunctionContextImpl( nodes, null, null, AffinityTopologyVersion.NONE, cctx.config().getBackups()); return func.assignPartitions(ctx); }
throw new IgniteException("Mandatory RemoteTransformerFactory is not set for the query: " + qry); Collection<ClusterNode> nodes = context().grid().cluster().nodes();
/** * @return All configured public cache instances. */ public Collection<IgniteCacheProxy<?, ?>> publicCaches() { Collection<IgniteCacheProxy<?, ?>> res = new ArrayList<>(jCacheProxies.size()); for (IgniteCacheProxyImpl<?, ?> proxy : jCacheProxies.values()) { if (proxy.context().userCache()) res.add(proxy.gatewayWrapper()); } return res; }
/** * @param cacheName Cache name. * @param stop {@code True} for stop cache, {@code false} for close cache. * @param restart Restart flag. */ void blockGateway(String cacheName, boolean stop, boolean restart) { // Break the proxy before exchange future is done. IgniteCacheProxyImpl<?, ?> proxy = jcacheProxy(cacheName, false); if (restart) { GridCacheAdapter<?, ?> cache = caches.get(cacheName); if (cache != null) cache.active(false); } if (proxy != null) { if (stop) { if (restart) proxy.restart(); proxy.context().gate().stopped(); } else proxy.closeProxy(); } }
/** * @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(); }
throw new IgniteException("Mandatory RemoteTransformerFactory is not set for the query: " + qry); Collection<ClusterNode> nodes = context().grid().cluster().nodes();