/** * @param name Cache name. * @param eagerTtl Eager ttl falg. * @return Cache configuration. */ private CacheConfiguration createCacheConfiguration(@NotNull String name, boolean eagerTtl) { CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setEagerTtl(eagerTtl); ccfg.setName(name); return ccfg; }
/** * @param name Cache name. * @return Cache configuration. */ private CacheConfiguration createCacheConfiguration(String name) { CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setCacheMode(cacheMode); ccfg.setEagerTtl(true); ccfg.setName(name); return ccfg; }
/** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception { CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName); if (nearCache) cfg.setNearConfiguration(new NearCacheConfiguration()); cfg.setExpiryPolicyFactory(factory); if (disableEagerTtl) cfg.setEagerTtl(false); return cfg; }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception { MvccFeatureChecker.skipIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName); if (lsnrCfg != null) cfg.addCacheEntryListenerConfiguration(lsnrCfg); cfg.setEagerTtl(eagerTtl()); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { MvccFeatureChecker.skipIfNotSupported(MvccFeatureChecker.Feature.EXPIRATION); IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setCacheMode(cacheMode); ccfg.setEagerTtl(true); cfg.setCacheConfiguration(ccfg); return cfg; }
/** * Create system cache used by Hadoop component. * * @return Hadoop cache configuration. */ public static CacheConfiguration hadoopSystemCache() { CacheConfiguration cache = new CacheConfiguration(); cache.setName(CU.SYS_CACHE_HADOOP_MR); cache.setCacheMode(REPLICATED); cache.setAtomicityMode(TRANSACTIONAL); cache.setWriteSynchronizationMode(FULL_SYNC); cache.setEvictionPolicyFactory(null); cache.setEvictionPolicy(null); cache.setCacheStoreFactory(null); cache.setNodeFilter(CacheConfiguration.ALL_NODES); cache.setEagerTtl(true); cache.setRebalanceMode(SYNC); return cache; }
/** */ public CacheConfiguration getCacheConfiguration(String name) { CacheConfiguration ccfg = new CacheConfiguration(); ccfg.setName(name); ccfg.setAtomicityMode(ATOMIC); ccfg.setBackups(1); ccfg.setAffinity(new RendezvousAffinityFunction(false, 32768)); ccfg.setEagerTtl(true); ccfg.setExpiryPolicyFactory(ModifiedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 20))); return ccfg; }
/** * @return Cache configuration for this test. */ private CacheConfiguration cacheConfiguration() { CacheConfiguration cfg = new CacheConfiguration(CACHE_NAME); cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC) .setCacheMode(CacheMode.PARTITIONED) .setRebalanceMode(CacheRebalanceMode.SYNC) .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC) .setRebalanceThrottle(100) .setRebalanceBatchSize(2 * 1024 * 1024) .setBackups(1) .setEagerTtl(false); return cfg; } }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setCacheMode(cacheMode); ccfg.setEagerTtl(true); ccfg.setEvictionPolicy(new FifoEvictionPolicy(ENTRIES_LIMIT, 100)); ccfg.setOnheapCacheEnabled(true); ccfg.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.HOURS, 12))); cfg.setCacheConfiguration(ccfg); return cfg; }
CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); ccfg.setAtomicityMode(atomicityMode); ccfg.setEagerTtl(eagerTtl); ccfg.setIndexedTypes(Integer.class, Integer.class);
.setExpiryPolicyFactory(new PlatformExpiryPolicyFactory(-1, -2, ttl)).setEagerTtl(true) );
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { final IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); final CacheConfiguration ccfg = new CacheConfiguration(); ccfg.setName(CACHE_NAME); ccfg.setAffinity(new RendezvousAffinityFunction(false, 32)); ccfg.setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(new Duration(TimeUnit.SECONDS, EXPIRATION_TIMEOUT))); ccfg.setEagerTtl(true); ccfg.setGroupName("group1"); ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); ccfg.setRebalanceMode(CacheRebalanceMode.SYNC); cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setMaxSize(192L * 1024 * 1024) .setPersistenceEnabled(true) ).setWalMode(WALMode.LOG_ONLY)); cfg.setCacheConfiguration(ccfg); return cfg; }
ccfg.setCacheMode(CacheMode.fromOrdinal(in.readInt())); ccfg.setCopyOnRead(in.readBoolean()); ccfg.setEagerTtl(in.readBoolean()); ccfg.setInvalidate(in.readBoolean()); ccfg.setStoreKeepBinary(in.readBoolean());
cfg.setEagerTtl(reader.readBoolean()); break;
/** * Create system cache used by Hadoop component. * * @return Hadoop cache configuration. */ public static CacheConfiguration hadoopSystemCache() { CacheConfiguration cache = new CacheConfiguration(); cache.setName(CU.SYS_CACHE_HADOOP_MR); cache.setCacheMode(REPLICATED); cache.setAtomicityMode(TRANSACTIONAL); cache.setWriteSynchronizationMode(FULL_SYNC); cache.setEvictionPolicyFactory(null); cache.setEvictionPolicy(null); cache.setCacheStoreFactory(null); cache.setNodeFilter(CacheConfiguration.ALL_NODES); cache.setEagerTtl(true); cache.setRebalanceMode(SYNC); return cache; }
ccfg.setCacheMode(CacheMode.fromOrdinal(in.readInt())); ccfg.setCopyOnRead(in.readBoolean()); ccfg.setEagerTtl(in.readBoolean()); ccfg.setInvalidate(in.readBoolean()); ccfg.setStoreKeepBinary(in.readBoolean());
cfg.setEagerTtl(reader.readBoolean()); break;