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


Java IgniteConfiguration.setManagementThreadPoolSize方法代码示例

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


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

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

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


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