@Override public T applyx() throws IgniteCheckedException { return c.applyx(cache.context()); } });
/** {@inheritDoc} */ @Override public void restart(IgniteInternalCache cache) { invalidateLocalState(); cacheView = cache; ctx = cache.context(); rmvCheck = true; suspendFut.onDone(); }
/** * @return Cache context with given name from node. */ private GridCacheContext cacheContext(IgniteEx node, String cacheName) { return node.cachex(cacheName).context(); }
@Override public Object call() throws Exception { qryProc.querySqlFields(cache.context(), qry, null, false, false); return null; } }, IgniteSQLException.class, "Multiple statements queries are not supported for local queries");
/** * Verifies there is no ongoing user transaction. * * @throws CacheException */ private void checkTx() throws CacheException { if (delegate.context().tm().inUserTx()) throw new CacheException("Explicit lock can't be acquired within a transaction."); }
/** {@inheritDoc} */ @Override public void resetQueryDetailMetrics() { IgniteInternalCache<K, V> delegate = getDelegateSafe(); delegate.context().queries().resetDetailMetrics(); }
@Override public Object call() throws Exception { qryProc.querySqlFields(cache.context(), qry, null, false, true); return null; } }, IgniteSQLException.class, "Multiple statements queries are not supported");
/** {@inheritDoc} */ @Override public void resetQueryMetrics() { IgniteInternalCache<K, V> delegate = getDelegateSafe(); delegate.context().queries().resetMetrics(); }
/** {@inheritDoc} */ @Override public Collection<? extends QueryDetailMetrics> queryDetailMetrics() { IgniteInternalCache<K, V> delegate = getDelegateSafe(); return delegate.context().queries().detailMetrics(); }
/** {@inheritDoc} */ @Override public QueryMetrics queryMetrics() { IgniteInternalCache<K, V> delegate = getDelegateSafe(); return delegate.context().queries().metrics(); }
/** * @return Maximum number of bytes for IGFS data cache. */ public long maxSpaceSize() { DataRegion plc = dataCachePrj.context().dataRegion(); long size = plc != null ? plc.config().getMaxSize() : 0; return (size <= 0) ? 0 : size ; }
@Override public void run() { try { Iterable<CacheEntryEvent<?, ?>> entries = serviceCache.context().continuousQueries().existingEntries(false, null); onSystemCacheUpdated(entries); } catch (IgniteCheckedException e) { U.error(log, "Failed to load service entries: " + e, e); } } });
/** */ private static long updateCoutner(Ignite ign, Object key) { return dataStore(((IgniteEx)ign).cachex(DEFAULT_CACHE_NAME).context(), key) .map(IgniteCacheOffheapManager.CacheDataStore::updateCounter) .orElse(0L); }
/** */ private static long updateCoutner(Ignite ign, Object key) { return dataStore(((IgniteEx)ign).cachex(DEFAULT_CACHE_NAME).context(), key) .map(IgniteCacheOffheapManager.CacheDataStore::updateCounter) .orElse(0L); }
/** {@inheritDoc} */ @Override public void run() { IgniteInternalCache cache = ignite.context().cache().cache(name); try { cache.context().offheap().preloadPartition(part); } catch (IgniteCheckedException e) { log.error("Failed to preload the partition [cache=" + name + ", partition=" + part + ']', e); throw new IgniteException(e); } } }
/** * @return {@code true} if near cache should be enabled. */ protected boolean nearEnabled() { return grid(testedNodeIdx).cachex(cacheName()).context().isNear(); }
/** * @param node Node. * @param key Key. * @return Extracts update counter of partition which key belongs to. */ private long getUpdateCounter(IgniteEx node, Integer key) { int partId = node.cachex(DEFAULT_CACHE_NAME).context().affinity().partition(key); GridDhtLocalPartition part = node.cachex(DEFAULT_CACHE_NAME).context().dht().topology().localPartition(partId); assert part != null; return part.updateCounter(); } }
/** @return Policy. */ protected T policy() { CacheEvictionManager evictMgr = grid().cachex(DEFAULT_CACHE_NAME).context().evicts(); assert evictMgr instanceof GridCacheEvictionManager : evictMgr; return (T)((GridCacheEvictionManager)evictMgr).getEvictionPolicy(); }
/** * @param i Grid index. * @return Policy. */ protected T policy(int i) { CacheEvictionManager evictMgr = grid(i).cachex(DEFAULT_CACHE_NAME).context().evicts(); assert evictMgr instanceof GridCacheEvictionManager : evictMgr; return (T)((GridCacheEvictionManager)evictMgr).getEvictionPolicy(); }
/** * @param i Grid index. * @return Policy. */ protected T nearPolicy(int i) { CacheEvictionManager evictMgr = grid(i).cachex(DEFAULT_CACHE_NAME).context().near().context().evicts(); assert evictMgr instanceof GridCacheEvictionManager : evictMgr; return (T)((GridCacheEvictionManager)evictMgr).getEvictionPolicy(); } /**