/** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = super.collectionConfiguration(); colCfg.setBackups(0); return colCfg; }
/** Get {@link CollectionConfiguration} with number of backups equal to {@link AtomicConfiguration} default */ private CollectionConfiguration getCollectionConfiguration() { return new CollectionConfiguration().setBackups(AtomicConfiguration.DFLT_BACKUPS); } }
/** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = super.collectionConfiguration(); colCfg.setBackups(0); return colCfg; }
/** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = super.collectionConfiguration(); colCfg.setBackups(backups); return colCfg; }
/** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = super.collectionConfiguration(); colCfg.setBackups(BACKUP_CNT); return colCfg; }
/** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = super.collectionConfiguration(); colCfg.setBackups(1); return colCfg; }
/** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = super.collectionConfiguration(); colCfg.setBackups(0); return colCfg; }
/** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = super.collectionConfiguration(); if (colCfg.getCacheMode() == PARTITIONED) colCfg.setBackups(1); return colCfg; }
@Override public void apply(Ignite ignite) { for (int i = 0; i < 100; i++) { CollectionConfiguration colCfg = new CollectionConfiguration(); colCfg.setBackups(1); colCfg.setCacheMode(PARTITIONED); colCfg.setAtomicityMode(i % 2 == 0 ? TRANSACTIONAL : ATOMIC); IgniteQueue q = ignite.queue("q-" + i, 0, colCfg); q.close(); } } });
@Override public void apply(Ignite ignite) { for (int i = 0; i < 100; i++) { CollectionConfiguration colCfg = new CollectionConfiguration(); colCfg.setCollocated(collocated); colCfg.setBackups(1); colCfg.setCacheMode(PARTITIONED); colCfg.setAtomicityMode(i % 2 == 0 ? TRANSACTIONAL : ATOMIC); IgniteSet set = ignite.set("set-" + i, colCfg); set.close(); } } });
/** * @return Collection configuration. */ protected CollectionConfiguration collectionConfiguration() { CollectionConfiguration colCfg = new CollectionConfiguration(); colCfg.setCacheMode(collectionCacheMode()); colCfg.setAtomicityMode(collectionCacheAtomicityMode()); colCfg.setOffHeapMaxMemory(collectionOffHeapMaxMemory()); if (colCfg.getCacheMode() == PARTITIONED) colCfg.setBackups(1); return colCfg; }
public void initializeCache() throws Exception { CacheConfiguration<String, Integer> cacheCfg = new CacheConfiguration<>(); cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); cacheCfg.setName(CHANNELS); cacheCfg.setBackups(2); channelCache = ignite.getOrCreateCache(cacheCfg); logger.info("Channel cache:"+channelCache); colCfg = new CollectionConfiguration(); colCfg.setCollocated(true); colCfg.setBackups(1); channelSize = Integer.parseInt(System.getProperty(CHANNEL_CAPACITY, DEFAULT_CHANNEL_CAPACITY)); logger.info("Starting alert receiver"); }
public void initIgniteCache() { cacheCfg = new CacheConfiguration<>(); cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); cacheCfg.setName(MCM_METRICS); cacheCfg.setBackups(2); seriesLookup = ignite.getOrCreateCache(cacheCfg); colCfg = new CollectionConfiguration(); colCfg.setCollocated(true); colCfg.setBackups(1); colCfg.setCacheMode(CacheMode.REPLICATED); seriesSize = Integer.parseInt(System.getProperty(SERIES_CAPACITY, DEFAULT_SERIES_CAPACITY)); cfg = new CollectionConfiguration(); cfg.setBackups(1); cfg.setCacheMode(CacheMode.REPLICATED); logger.info("Initialized Ignite cache for performance monitoring"); }
collectionCfg = new CollectionConfiguration(); collectionCfg.setAtomicityMode(cacheCfg.getAtomicityMode()); collectionCfg.setBackups(cacheCfg.getBackups()); break;
collectionCfg = new CollectionConfiguration(); collectionCfg.setAtomicityMode(cacheCfg.getAtomicityMode()); collectionCfg.setBackups(cacheCfg.getBackups()); break;