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


Java IgniteConfiguration.setAtomicConfiguration方法代码示例

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

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

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

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

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

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

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


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