/** * @param grp Caches group name. * @throws Exception If failed. */ private void startMultipleClientCaches(@Nullable String grp) throws Exception { final int SRVS = 1; Ignite srv = startGrids(SRVS); client = true; Ignite client = startGrid(SRVS); for (CacheAtomicityMode atomicityMode : values()) { for (boolean batch : new boolean[]{false, true}) startCachesForGroup(srv, client, grp, atomicityMode, batch); } }
/** * @throws Exception if failed. */ public void checkModes(int gridCnt) throws Exception { startGrids(gridCnt); try { for (CacheMode mode : CacheMode.values()) { for (CacheAtomicityMode atomMode : CacheAtomicityMode.values()) { if (mode == CacheMode.PARTITIONED) { // Near cache makes sense only for partitioned cache. checkTxCache(CacheMode.PARTITIONED, atomMode, true, false); } checkTxCache(mode, atomMode, false, true); checkTxCache(mode, atomMode, false, false); } } } finally { stopAllGrids(); } }
/** */ private void testOOMPropagation(boolean useStreamer) throws Exception { for (CacheAtomicityMode atomicityMode : CacheAtomicityMode.values()) { for (CacheMode cacheMode : CacheMode.values()) { for (CacheWriteSynchronizationMode writeSyncMode : CacheWriteSynchronizationMode.values()) { for (int backupsCnt = 0; backupsCnt <= 1; backupsCnt++) { if (writeSyncMode == CacheWriteSynchronizationMode.FULL_ASYNC || cacheMode == CacheMode.REPLICATED) continue; if (atomicityMode == CacheAtomicityMode.TRANSACTIONAL && !useStreamer) { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { checkOOMPropagation( false, CacheAtomicityMode.TRANSACTIONAL, cacheMode, writeSyncMode, backupsCnt, concurrency, isolation); } } } checkOOMPropagation(useStreamer, atomicityMode, cacheMode, writeSyncMode, backupsCnt); } } } } }
for (CacheAtomicityMode atomicityMode : CacheAtomicityMode.values()) { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);