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