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


Java IgniteConfiguration.setPublicThreadPoolSize方法代码示例

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


在下文中一共展示了IgniteConfiguration.setPublicThreadPoolSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    cfg.setPublicThreadPoolSize(THREAD_COUNT);

    DataStorageConfiguration mem = new DataStorageConfiguration();

    mem.setPageSize(PAGE_SIZE);

    cfg.setDataStorageConfiguration(mem);

    CacheConfiguration[] ccfgs = new CacheConfiguration[CACHE_COUNT];

    for (int i = 0; i < CACHE_COUNT; ++i) {
        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
        ccfg.setName(CACHE_PREFIX + i);
        ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
        ccfg.setCacheMode(CacheMode.PARTITIONED);
        ccfgs[i] = ccfg;
    }

    cfg.setCacheConfiguration(ccfgs);

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

示例3: 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

示例4: 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

示例5: getConfiguration

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

    cfg.setExecutorConfiguration(createExecConfiguration(EXEC_NAME0), createExecConfiguration(EXEC_NAME1));
    cfg.setPublicThreadPoolSize(1);

    CacheConfiguration ccfg = new CacheConfiguration();
    ccfg.setName(CACHE_NAME);

    cfg.setCacheConfiguration(ccfg);

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

示例6: 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

示例7: getConfiguration

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

    // TODO: IGNITE-3099 (hotfix the test to check the event order in common case).
    cfg.setPublicThreadPoolSize(1);

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

示例8: 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

示例9: 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

示例10: getConfiguration

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

    cfg.setCommunicationSpi(new TcpCommunicationSpi());

    cfg.setDiscoverySpi(getDiscoverySpi(cfg));

    cfg.setMetricsHistorySize(1000);

    cfg.setPublicThreadPoolSize(100);

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

示例11: getConfiguration

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

    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();

    discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true));

    c.setDiscoverySpi(discoSpi);

    c.setPublicThreadPoolSize(SPLIT_COUNT * EXEC_COUNT);

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

示例12: getConfiguration

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

    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();

    discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true));

    c.setDiscoverySpi(discoSpi);

    c.setPublicThreadPoolSize(SPLIT_COUNT * 2);

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

示例13: getConfiguration

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

    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();

    discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true));

    c.setDiscoverySpi(discoSpi);

    c.setPublicThreadPoolSize(JOB_NUM * 2);

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

示例14: getConfiguration

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

    cfg.setPublicThreadPoolSize(1);

    ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);

    cfg.setMarshaller(new BinaryMarshaller());

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

示例15: 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.setPublicThreadPoolSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。