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


Java IgniteConfiguration.setSystemThreadPoolSize方法代码示例

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


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

示例1: helloworldConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
public static IgniteConfiguration helloworldConfiguration() {
	int cpus = Runtime.getRuntime().availableProcessors();
	IgniteConfiguration cfg = new IgniteConfiguration();
	cfg.setIgniteInstanceName("hello-world");
	cfg.setClientMode(true);
	cfg.setPeerClassLoadingEnabled(true);
	cfg.setDeploymentMode(DeploymentMode.CONTINUOUS);
	cfg.setPeerClassLoadingMissedResourcesCacheSize(200);
	cfg.setPublicThreadPoolSize(4 * cpus);
	cfg.setSystemThreadPoolSize(2 * cpus);
	// log frequency in ms
	cfg.setMetricsLogFrequency(30000);
	cfg.setGridLogger(igniteLogger());
	cfg.setDiscoverySpi(multicastDiscoverySpi());
	return cfg;
}
 
开发者ID:gauravrmazra,项目名称:gauravbytes,代码行数:17,代码来源:IgniteConfigurationHelper.java

示例2: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);

    cfg.setClientMode(client);

    if (!client) {
        cfg.setPublicThreadPoolSize(SYS_THREADS);
        cfg.setSystemThreadPoolSize(SYS_THREADS);
    }

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

示例3: apply

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
@Override
public Ignite apply(ExtendedActorSystem system) {
    final IgniteProperties properties = igniteConfigProvider.apply(system);
    final IgniteConfiguration igniteConfiguration = new IgniteConfiguration();
    igniteConfiguration.setClientMode(properties.isClientNode());
    // durable file memory persistence
    if (properties.isEnableFilePersistence()) {
        DataStorageConfiguration persistentStoreConfiguration = new DataStorageConfiguration();
        persistentStoreConfiguration.setStoragePath(properties.getIgnitePersistenceFilePath() + "/data/store");
        persistentStoreConfiguration.setWalArchivePath(properties.getIgnitePersistenceFilePath() + "./data/walArchive");
        igniteConfiguration.setDataStorageConfiguration(persistentStoreConfiguration);
    }
    // connector configuration
    final ConnectorConfiguration connectorConfiguration = new ConnectorConfiguration();
    connectorConfiguration.setPort(properties.getIgniteConnectorPort());
    // common ignite configuration
    igniteConfiguration.setMetricsLogFrequency(properties.getMetricsLogFrequency());
    igniteConfiguration.setQueryThreadPoolSize(properties.getQueryThreadPoolSize());
    igniteConfiguration.setDataStreamerThreadPoolSize(properties.getDataStreamerThreadPoolSize());
    igniteConfiguration.setManagementThreadPoolSize(properties.getManagementThreadPoolSize());
    igniteConfiguration.setPublicThreadPoolSize(properties.getPublicThreadPoolSize());
    igniteConfiguration.setSystemThreadPoolSize(properties.getSystemThreadPoolSize());
    igniteConfiguration.setRebalanceThreadPoolSize(properties.getRebalanceThreadPoolSize());
    igniteConfiguration.setAsyncCallbackPoolSize(properties.getAsyncCallbackPoolSize());
    igniteConfiguration.setPeerClassLoadingEnabled(properties.isPeerClassLoadingEnabled());

    final BinaryConfiguration binaryConfiguration = new BinaryConfiguration();
    binaryConfiguration.setCompactFooter(false);
    igniteConfiguration.setBinaryConfiguration(binaryConfiguration);
    // cluster tcp configuration
    final TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
    final TcpDiscoveryVmIpFinder tcpDiscoveryVmIpFinder = new TcpDiscoveryVmIpFinder();
    // need to be changed when it come to real cluster configuration
    tcpDiscoveryVmIpFinder.setAddresses(Arrays.asList(properties.getTcpDiscoveryAddresses() + properties.getIgniteServerPortRange()));
    tcpDiscoverySpi.setIpFinder(tcpDiscoveryVmIpFinder);
    igniteConfiguration.setDiscoverySpi(new TcpDiscoverySpi());
    final Ignite ignite = Ignition.start(igniteConfiguration);
    Runtime.getRuntime().addShutdownHook(new Thread(ignite::close));
    return ignite;
}
 
开发者ID:Romeh,项目名称:akka-persistance-ignite,代码行数:41,代码来源:IgniteFactoryByConfig.java

示例4: getConfiguration

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

    // Use small system thread pool to reproduce the issue.
    cfg.setSystemThreadPoolSize(IGNITE_THREAD_POOL_SIZE);

    cfg.setMarshaller(new BinaryMarshaller());

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

示例5: getConfiguration

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

        TcpDiscoverySpi disco = new TcpDiscoverySpi();

        disco.setIpFinder(ipFinder);

        c.setDiscoverySpi(disco);

        c.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED);
        c.setIncludeProperties();
        c.setDeploymentMode(DeploymentMode.SHARED);
        c.setNetworkTimeout(10000);
        c.setConnectorConfiguration(null);

//        c.setPeerClassLoadingLocalClassPathExclude(GridCachePreloadLifecycleAbstractTest.class.getName(),
//            MyValue.class.getName());

        c.setPublicThreadPoolSize(10);
        c.setSystemThreadPoolSize(10);
        c.setPeerClassLoadingThreadPoolSize(3);

        c.setLifecycleBeans(lifecycleBean);

        return c;
    }
 
开发者ID:apache,项目名称:ignite,代码行数:28,代码来源:GridCachePreloadLifecycleAbstractTest.java

示例6: config

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的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

示例7: getConfiguration

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

    cfg.setSystemThreadPoolSize(SYSTEM_POOL_SIZE);

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
    ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);

    cfg.setClientMode(client);

    MemoryEventStorageSpi storeSpi = new MemoryEventStorageSpi();
    storeSpi.setExpireCount(100);

    cfg.setEventStorageSpi(storeSpi);

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

示例8: getConfiguration

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

    CacheConfiguration cc = defaultCacheConfiguration();

    cc.setCacheMode(
        CacheMode.PARTITIONED);
    cc.setWriteSynchronizationMode(
        CacheWriteSynchronizationMode.FULL_SYNC);
    cc.setRebalanceMode(
        CacheRebalanceMode.SYNC);
    cc.setAffinity(new RendezvousAffinityFunction(false, 1300));
    cc.setBackups(2);

    CacheConfiguration cc1 = defaultCacheConfiguration();

    cc1.setName("cc1");
    cc1.setCacheMode(
        CacheMode.PARTITIONED);
    cc1.setWriteSynchronizationMode(
        CacheWriteSynchronizationMode.FULL_SYNC);
    cc1.setRebalanceMode(
        CacheRebalanceMode.SYNC);
    cc1.setAffinity(
        new RendezvousAffinityFunction(
            false,
            1300));
    cc1.setBackups(2);

    TcpDiscoverySpi disco = new TcpDiscoverySpi();

    disco.setIpFinder(ipFinder);

    c.setDiscoverySpi(disco);

    c.setIgfsThreadPoolSize(1);
    c.setSystemThreadPoolSize(2);
    c.setPublicThreadPoolSize(2);
    c.setManagementThreadPoolSize(1);
    c.setUtilityCachePoolSize(2);
    c.setPeerClassLoadingThreadPoolSize(1);

    c.setCacheConfiguration(cc, cc1);

    TcpCommunicationSpi comm = new TcpCommunicationSpi();

    comm.setSharedMemoryPort(-1);

    c.setCommunicationSpi(comm);

    return c;
}
 
开发者ID:apache,项目名称:ignite,代码行数:54,代码来源:GridCacheDhtPreloadPerformanceTest.java

示例9: getConfiguration

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

    cfg.setPublicThreadPoolSize(RETRIES * 2);

    cfg.setSystemThreadPoolSize(RETRIES * 2);

    cfg.setConnectorConfiguration(null);

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


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