本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setPersistentStoreConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setPersistentStoreConfiguration方法的具体用法?Java IgniteConfiguration.setPersistentStoreConfiguration怎么用?Java IgniteConfiguration.setPersistentStoreConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.configuration.IgniteConfiguration
的用法示例。
在下文中一共展示了IgniteConfiguration.setPersistentStoreConfiguration方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 discoSpi = new TestTcpDiscoverySpi();
discoSpi.setIpFinder(LOCAL_IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
CacheConfiguration singleCacheCfg = new CacheConfiguration()
.setName(DEFAULT_CACHE_NAME)
.setCacheMode(CacheMode.PARTITIONED)
.setBackups(1)
.setAtomicityMode(CacheAtomicityMode.ATOMIC);
cfg.setCacheConfiguration(singleCacheCfg);
//persistence must be enabled to verify restoring mappings from FS case
if (isPersistenceEnabled)
cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());
return cfg;
}
示例2: configPersistence
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
* Setup persistence for compatible and current version node.
*
* @param cfg ignite config to setup.
*/
private static void configPersistence(IgniteConfiguration cfg) {
final PersistentStoreConfiguration psCfg = new PersistentStoreConfiguration();
cfg.setPersistentStoreConfiguration(psCfg);
final MemoryConfiguration memCfg = new MemoryConfiguration();
final MemoryPolicyConfiguration memPolCfg = new MemoryPolicyConfiguration();
memPolCfg.setMaxSize(32 * 1024 * 1024); // we don't need much memory for this test
memCfg.setMemoryPolicies(memPolCfg);
cfg.setMemoryConfiguration(memCfg);
}
示例3: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setMemoryConfiguration(new MemoryConfiguration().setDefaultMemoryPolicyName("d").
setPageSize(1024).setMemoryPolicies(new MemoryPolicyConfiguration().setName("d").
setInitialSize(50 * 1024 * 1024L).setMaxSize(50 * 1024 * 1024)));
cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration().setWalMode(WALMode.LOG_ONLY));
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
return cfg;
}
示例4: apply
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void apply(IgniteConfiguration cfg) {
cfg.setLocalHost("127.0.0.1");
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(GridCacheAbstractFullApiSelfTest.LOCAL_IP_FINDER);
cfg.setDiscoverySpi(disco);
cfg.setPeerClassLoadingEnabled(false);
cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());
if (!compactFooter)
cfg.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(compactFooter));
}
示例5: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setConsistentId(gridName);
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());
return cfg;
}