当前位置: 首页>>代码示例>>Java>>正文


Java IgniteConfiguration.setPersistentStoreConfiguration方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:24,代码来源:IgniteMarshallerCacheFSRestoreTest.java

示例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);
}
 
开发者ID:apache,项目名称:ignite,代码行数:18,代码来源:FoldersReuseCompatibilityTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:15,代码来源:IgnitePdsCacheAssignmentNodeRestartsTest.java

示例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));
}
 
开发者ID:apache,项目名称:ignite,代码行数:17,代码来源:DummyPersistenceCompatibilityTest.java

示例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;
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:IgnitePdsBinarySortObjectFieldsTest.java


注:本文中的org.apache.ignite.configuration.IgniteConfiguration.setPersistentStoreConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。