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


Java CacheConfiguration.setMaxConcurrentAsyncOperations方法代码示例

本文整理汇总了Java中org.apache.ignite.configuration.CacheConfiguration.setMaxConcurrentAsyncOperations方法的典型用法代码示例。如果您正苦于以下问题:Java CacheConfiguration.setMaxConcurrentAsyncOperations方法的具体用法?Java CacheConfiguration.setMaxConcurrentAsyncOperations怎么用?Java CacheConfiguration.setMaxConcurrentAsyncOperations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.configuration.CacheConfiguration的用法示例。


在下文中一共展示了CacheConfiguration.setMaxConcurrentAsyncOperations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: cacheConfiguration

import org.apache.ignite.configuration.CacheConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
    CacheConfiguration cCfg = super.cacheConfiguration(igniteInstanceName);

    cCfg.setMaxConcurrentAsyncOperations(MAX_CONCURRENT_ASYNC_OPS);

    return cCfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:9,代码来源:GridCacheAsyncOperationsLimitSelfTest.java

示例2: config

import org.apache.ignite.configuration.CacheConfiguration; //导入方法依赖的package包/类
/**
 * Create node configuration.
 *
 * @param name Node name.
 * @param ipFinder IpFinder.
 * @return Configuration.
 * @throws Exception If failed.
 */
private IgniteConfiguration config(String name, TcpDiscoveryVmIpFinder ipFinder) throws Exception {
    // Data cache configuration.
    CacheConfiguration dataCcfg = new CacheConfiguration(DEFAULT_CACHE_NAME);

    dataCcfg.setCacheMode(CacheMode.REPLICATED);
    dataCcfg.setAtomicityMode(TRANSACTIONAL);
    dataCcfg.setWriteSynchronizationMode(FULL_SYNC);
    dataCcfg.setAffinityMapper(new DummyAffinityMapper(1));
    dataCcfg.setMaxConcurrentAsyncOperations(1);

    // Meta cache configuration.
    CacheConfiguration metaCcfg = new CacheConfiguration(DEFAULT_CACHE_NAME);

    metaCcfg.setCacheMode(CacheMode.REPLICATED);
    metaCcfg.setAtomicityMode(TRANSACTIONAL);
    metaCcfg.setWriteSynchronizationMode(FULL_SYNC);

    // File system configuration.
    FileSystemConfiguration igfsCfg = new FileSystemConfiguration();

    igfsCfg.setDefaultMode(IgfsMode.PRIMARY);
    igfsCfg.setFragmentizerEnabled(false);
    igfsCfg.setBlockSize(1024);
    igfsCfg.setDataCacheConfiguration(dataCcfg);
    igfsCfg.setMetaCacheConfiguration(metaCcfg);
    igfsCfg.setName(IGFS_NAME);

    // Ignite configuration.
    IgniteConfiguration cfg = getConfiguration(name);

    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();

    discoSpi.setIpFinder(ipFinder);

    cfg.setDiscoverySpi(discoSpi);
    cfg.setFileSystemConfiguration(igfsCfg);

    cfg.setLocalHost("127.0.0.1");
    cfg.setConnectorConfiguration(null);

    cfg.setStripedPoolSize(2);
    cfg.setSystemThreadPoolSize(2);
    cfg.setRebalanceThreadPoolSize(1);
    cfg.setPublicThreadPoolSize(1);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:56,代码来源:IgfsBlockMessageSystemPoolStarvationSelfTest.java


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