/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
/** * @return Distribution. */ protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); }
/** * @return Distribution mode. */ protected NearCacheConfiguration nearConfiguration() { return near ? new NearCacheConfiguration() : null; }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } }
@Override public Object call() throws Exception { ignite1.getOrCreateNearCache(cacheName, new NearCacheConfiguration<>()); return null; } }, CacheException.class, null);
/** * @throws Exception If failed. */ @Test public void testOptimisticSerializableTxNearEnabled() throws Exception { optimisticSerializableTx(new NearCacheConfiguration()); }
/** * @return Near cache configuration. */ private NearCacheConfiguration<Object, Object> nearCacheConfiguration() { NearCacheConfiguration<Object, Object> cfg = new NearCacheConfiguration<>(); cfg.setNearEvictionPolicy(new LruEvictionPolicy<>(25000)); return cfg; }
/** * @throws Exception If failed. */ @Test public void testPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration<>()); doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); }
/** * @throws Exception If failed. */ @Test public void testPessimisticWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2) .setNearConfiguration(new NearCacheConfiguration<>()); doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); }
/** * @throws Exception If failed. */ @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); failOnWrite = true; doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); }
/** * @throws Exception If failed. */ @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); failOnWrite = true; doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); CacheConfiguration cacheCfg = defaultCacheConfiguration(); cacheCfg.setCacheMode(mode); cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setAtomicityMode(TRANSACTIONAL); cacheCfg.setNearConfiguration(new NearCacheConfiguration()); cfg.setCacheConfiguration(cacheCfg); return cfg; }
/** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception { CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName); ccfg.setBackups(1); if (hasNearCache()) ccfg.setNearConfiguration(new NearCacheConfiguration()); FifoEvictionPolicy plc = new FifoEvictionPolicy(); plc.setMaxSize(HEAP_ENTRIES); ccfg.setEvictionPolicy(plc); ccfg.setOnheapCacheEnabled(true); return ccfg; }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); Ignite client = ignite(gridCount() - 1); assertTrue(client.cluster().localNode().isClient()); for (CacheConfiguration<Integer, Integer> ccfg : cacheConfigurations()) { grid(0).createCache(ccfg); client.createNearCache(ccfg.getName(), new NearCacheConfiguration<>()); } awaitPartitionMapExchange(); }