本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setAtomicConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setAtomicConfiguration方法的具体用法?Java IgniteConfiguration.setAtomicConfiguration怎么用?Java IgniteConfiguration.setAtomicConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.configuration.IgniteConfiguration
的用法示例。
在下文中一共展示了IgniteConfiguration.setAtomicConfiguration方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(spi);
AtomicConfiguration atomicCfg = atomicConfiguration();
assertNotNull(atomicCfg);
cfg.setAtomicConfiguration(atomicCfg);
return cfg;
}
示例2: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(spi);
cfg.setPublicThreadPoolSize(THREAD_NUM);
AtomicConfiguration atomicCfg = atomicConfiguration();
assertNotNull(atomicCfg);
cfg.setAtomicConfiguration(atomicCfg);
return cfg;
}
示例3: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setIncludeEventTypes();
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
AtomicConfiguration acfg = new AtomicConfiguration();
acfg.setBackups(1);
cfg.setAtomicConfiguration(acfg);
cfg.setIncludeEventTypes(new int[0]);
return cfg;
}
示例4: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
AtomicConfiguration atomicCfg = new AtomicConfiguration();
atomicCfg.setCacheMode(PARTITIONED);
atomicCfg.setBackups(1);
atomicCfg.setAtomicSequenceReserveSize(10);
c.setAtomicConfiguration(atomicCfg);
c.getTransactionConfiguration().setDefaultTxConcurrency(PESSIMISTIC);
c.getTransactionConfiguration().setDefaultTxIsolation(REPEATABLE_READ);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(CacheMode.PARTITIONED);
cc.setRebalanceMode(CacheRebalanceMode.SYNC);
cc.setWriteSynchronizationMode(FULL_SYNC);
LruEvictionPolicy plc = new LruEvictionPolicy();
plc.setMaxSize(1000);
cc.setEvictionPolicy(plc);
cc.setOnheapCacheEnabled(true);
cc.setBackups(1);
cc.setAffinity(new RendezvousAffinityFunction(true));
c.setCacheConfiguration(cc);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
c.setDiscoverySpi(disco);
return c;
}
示例5: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
AtomicConfiguration atomicCfg = new AtomicConfiguration();
atomicCfg.setBackups(1);
atomicCfg.setCacheMode(PARTITIONED);
cfg.setAtomicConfiguration(atomicCfg);
return cfg;
}
示例6: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(spi);
CacheConfiguration cacheCfg = defaultCacheConfiguration();
cacheCfg.setCacheMode(PARTITIONED);
cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
cacheCfg.setRebalanceMode(SYNC);
cacheCfg.setBackups(1);
cfg.setCacheConfiguration(cacheCfg);
AtomicConfiguration atomicCfg = new AtomicConfiguration();
atomicCfg.setCacheMode(PARTITIONED);
atomicCfg.setGroupName("testGroup");
atomicCfg.setBackups(1);
cfg.setAtomicConfiguration(atomicCfg);
return cfg;
}
示例7: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
AtomicConfiguration atomicCfg = new AtomicConfiguration();
atomicCfg.setCacheMode(collectionCacheMode());
atomicCfg.setBackups(collectionConfiguration().getBackups());
cfg.setAtomicConfiguration(atomicCfg);
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(TRANSACTIONAL_CACHE_NAME);
ccfg.setAtomicityMode(TRANSACTIONAL);
cfg.setCacheConfiguration(ccfg);
if (client) {
cfg.setClientMode(client);
((TcpDiscoverySpi)(cfg.getDiscoverySpi())).setForceServerMode(true);
}
return cfg;
}
示例8: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
c.getTransactionConfiguration().setDefaultTxConcurrency(PESSIMISTIC);
c.getTransactionConfiguration().setDefaultTxIsolation(REPEATABLE_READ);
AtomicConfiguration atomicCfg = new AtomicConfiguration();
atomicCfg.setAtomicSequenceReserveSize(100000);
atomicCfg.setCacheMode(mode);
c.setAtomicConfiguration(atomicCfg);
if (cacheOn) {
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(mode);
LruEvictionPolicy plc = new LruEvictionPolicy();
plc.setMaxSize(1000);
cc.setEvictionPolicy(plc);
cc.setOnheapCacheEnabled(true);
cc.setWriteSynchronizationMode(FULL_SYNC);
cc.setRebalanceMode(NONE);
c.setCacheConfiguration(cc);
}
else
c.setCacheConfiguration();
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
c.setDiscoverySpi(disco);
c.setPeerClassLoadingEnabled(false);
return c;
}