/** * @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 ctx0 Cache context. * @param tx Transaction. * @param key Key. * @return Map of listeners to be notified by this update. */ public Map<UUID, CacheContinuousQueryListener> continuousQueryListeners(GridCacheContext ctx0, @Nullable IgniteInternalTx tx, KeyCacheObject key) { boolean internal = key != null && key.internal() || !ctx0.userCache(); return ctx0.continuousQueries().notifyContinuousQueries(tx) ? ctx0.continuousQueries().updateListeners(internal, false) : null; }
/** * Callback invoked by deployment manager for whenever a class loader gets undeployed. * * @param ldr Class loader. */ public void onUndeployed(ClassLoader ldr) { if (!ctx.isStopping()) { for (GridCacheAdapter<?, ?> cache : caches.values()) { // Do not notify system caches and caches for which deployment is disabled. if (cache.context().userCache() && cache.context().deploymentEnabled()) cache.onUndeploy(ldr); } } }
/** * @param cctx Cache context. */ private void addCacheContext(GridCacheContext cctx) { assert cacheType.userCache() == cctx.userCache() : cctx.name(); assert grpId == cctx.groupId() : cctx.name(); final boolean add; synchronized (this) { List<GridCacheContext> copy = new ArrayList<>(caches); assert sharedGroup() || copy.isEmpty(); add = copy.add(cctx); caches = Collections.unmodifiableList(copy); } assert add : cctx.name(); if (!qryEnabled && QueryUtils.isEnabled(cctx.config())) qryEnabled = true; if (!drEnabled && cctx.isDrEnabled()) drEnabled = true; }
/** * @param type Event type. * @return {@code True} if event is recordable. */ public boolean isRecordable(int type) { GridCacheContext cctx0 = cctx; // Event recording is impossible in recovery mode. if (cctx0 != null && cctx0.kernalContext().recoveryMode()) return false; return cctx0 != null && cctx0.userCache() && cctx0.gridEvents().isRecordable(type) && !cctx0.config().isEventsDisabled(); }
if (!e.getValue().context().userCache()) continue;
if (cacheCtx.userCache() && (!keys.isEmpty() || swapUndeployCnt != 0)) { U.quietAndWarn(log, ""); U.quietAndWarn(
if (!cache.context().userCache()) continue;
if (cache.context().userCache()) {
/** * @param cache Cache. */ private void checkCache(GridCacheAdapter cache) { assertNotNull(cache); assertFalse(cache.context().userCache()); assertTrue(cache.context().systemTx()); assertEquals(SYSTEM_POOL, cache.context().ioPolicy()); } }
GridCacheContext cctx = cache.context(); if (!cctx.userCache() || !cctx.group().mvccEnabled() || F.isEmpty(cctx.group().caches()) || cctx.shared().closed(cctx)) continue;
GridCacheAdapter cache = ctx.cache().internalCache(hnd0.cacheName()); if (cache != null && !cache.isLocal() && cache.context().userCache()) req.addUpdateCounters(ctx.localNodeId(), toCountersMap(cache.context().topology().localUpdateCounters(false)));
GridCacheContext<?, ?> cacheCtx = sharedCtx.cacheContext(dataRow.cacheId()); if (!cacheCtx.userCache()) continue;
/** * @param ignite Ignite. * @param name Cache name. * @param plc Expected IO policy. * @param user Expected user cache flag. * @param sysTx Expected system transaction flag. */ private void checkCache( Ignite ignite, String name, byte plc, boolean user, boolean sysTx) { GridCacheAdapter cache = ((IgniteKernal)ignite).context().cache().internalCache(name); assertNotNull("No cache " + name, cache); assertEquals("Unexpected property for cache: " + cache.name(), plc, cache.context().ioPolicy()); assertEquals("Unexpected property for cache: " + cache.name(), user, cache.context().userCache()); assertEquals("Unexpected property for cache: " + cache.name(), sysTx, cache.context().systemTx()); } }
boolean internal = isInternal() || !context().userCache();
boolean internal = isInternal() || !context().userCache();
GridCacheAdapter cache = ctx.cache().internalCache(hnd0.cacheName()); if (cache != null && !cache.isLocal() && cache.context().userCache()) { CachePartitionPartialCountersMap cntrsMap = cache.context().topology().localUpdateCounters(false);
checkObsolete(); boolean internal = isInternal() || !context().userCache();
pred).get(); if (hnd.isQuery() && cctx.userCache() && !locOnly && !onStart) hnd.waitTopologyFuture(cctx.kernalContext());
val, null, this.isInternal() || !this.context().userCache(), this.partition(), true,