/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { ((IgniteEx)ignite(0)).context().cache().dynamicStartSqlCache(cacheConfig()); conn = DriverManager.getConnection(getCfgUrl()); }
/** * Start SQL cache on given node. * @param node Node to create cache on. * @param ccfg Cache configuration. * @return Created cache. */ protected IgniteCache<?, ?> createSqlCache(Ignite node, CacheConfiguration ccfg) throws IgniteCheckedException { ((IgniteEx)node).context().cache().dynamicStartSqlCache(ccfg).get(); IgniteCache<?, ?> res = node.cache(CACHE_NAME); assertNotNull(res); return res; }
sql ? ctx.cache().dynamicStartSqlCache(cacheCfg).get() : ctx.cache().dynamicStartCache(cacheCfg, cacheName,
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public <K, V> IgniteBiTuple<IgniteCache<K, V>, Boolean> getOrCreateCache0( CacheConfiguration<K, V> cacheCfg, boolean sql) { A.notNull(cacheCfg, "cacheCfg"); CU.validateNewCacheName(cacheCfg.getName()); guard(); try { checkClusterState(); Boolean res = false; if (ctx.cache().cache(cacheCfg.getName()) == null) { res = sql ? ctx.cache().dynamicStartSqlCache(cacheCfg).get() : ctx.cache().dynamicStartCache(cacheCfg, cacheCfg.getName(), null, false, true, true).get(); } return new IgniteBiTuple<>((IgniteCache<K, V>)ctx.cache().publicJCache(cacheCfg.getName()), res); } catch (IgniteCheckedException e) { throw CU.convertToCacheException(e); } finally { unguard(); } }