props.put("booleanField", expBooleanVal); IgniteReflectionFactory<TestClass> factory = new IgniteReflectionFactory<>(TestClass.class);
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { MvccFeatureChecker.skipIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); IgniteConfiguration c = super.getConfiguration(igniteInstanceName); CacheConfiguration cc = defaultCacheConfiguration(); cc.setCacheMode(cacheMode); if (nearEnabled) cc.setNearConfiguration(new NearCacheConfiguration()); cc.setAtomicityMode(TRANSACTIONAL); cc.setCacheStoreFactory(new IgniteReflectionFactory<CacheStore>(TestStore.class)); cc.setReadThrough(true); cc.setWriteThrough(true); cc.setLoadPreviousValue(true); c.setCacheConfiguration(cc); c.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); return c; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); DataStorageConfiguration dbCfg = new DataStorageConfiguration(); dbCfg .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setMaxSize(512L * 1024 * 1024) .setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY); cfg.setDataStorageConfiguration(dbCfg); CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(CACHE_NAME) .setCacheStoreFactory(new IgniteReflectionFactory<>(TestStore.class)) .setAtomicityMode(atomicityMode) .setBackups(1) .setWriteThrough(true) .setReadThrough(true); cfg.setCacheConfiguration(ccfg); return cfg; }
cc.setCacheStoreFactory(new IgniteReflectionFactory<CacheStore>(TestStore.class)); cc.setReadThrough(true); cc.setWriteThrough(true);