本文整理汇总了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;
}
示例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;
}