com.hazelcast.config.Config.setNetworkConfig()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(213)

本文整理了Java中com.hazelcast.config.Config.setNetworkConfig()方法的一些代码示例,展示了Config.setNetworkConfig()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.setNetworkConfig()方法的具体详情如下:
包路径:com.hazelcast.config.Config
类名称:Config
方法名:setNetworkConfig

Config.setNetworkConfig介绍

[英]Sets the network configuration for this hazelcast instance. The network configuration defines how a member will interact with other members or clients.
[中]设置此hazelcast实例的网络配置。网络配置定义了成员将如何与其他成员或客户端交互。

代码示例

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public Config setNetworkConfig(NetworkConfig networkConfig) {
  return staticConfig.setNetworkConfig(networkConfig);
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public Config setNetworkConfig(NetworkConfig networkConfig) {
  return staticConfig.setNetworkConfig(networkConfig);
}

代码示例来源:origin: apifest/apifest-oauth20

private static Config createConfiguration() {
  Config config = new Config();
  NetworkConfig networkCfg = createNetworkConfigs();
  config.setNetworkConfig(networkCfg);
  ExecutorConfig executorConfig = new ExecutorConfig();
  executorConfig.setPoolSize(MAX_POOL_SIZE);
  executorConfig.setStatisticsEnabled(false);
  config.addExecutorConfig(executorConfig);
  return config;
}

代码示例来源:origin: kaazing/gateway

hazelCastConfig.setNetworkConfig(networkConfig);

代码示例来源:origin: org.apereo.cas/cas-server-support-hazelcast-core

/**
 * Build config.
 *
 * @param hz the hz
 * @return the config
 */
public static Config build(final BaseHazelcastProperties hz) {
  val cluster = hz.getCluster();
  val config = new Config();
  val networkConfig = new NetworkConfig()
    .setPort(cluster.getPort())
    .setPortAutoIncrement(cluster.isPortAutoIncrement());
  val joinConfig = cluster.getDiscovery().isEnabled()
    ? createDiscoveryJoinConfig(config, hz.getCluster(), networkConfig)
    : createDefaultJoinConfig(config, hz.getCluster());
  LOGGER.debug("Created Hazelcast join configuration [{}]", joinConfig);
  networkConfig.setJoin(joinConfig);
  LOGGER.debug("Created Hazelcast network configuration [{}]", networkConfig);
  config.setNetworkConfig(networkConfig);
  return config.setInstanceName(cluster.getInstanceName())
    .setProperty(BaseHazelcastProperties.HAZELCAST_DISCOVERY_ENABLED_PROP, BooleanUtils.toStringTrueFalse(cluster.getDiscovery().isEnabled()))
    .setProperty(BaseHazelcastProperties.IPV4_STACK_PROP, String.valueOf(cluster.isIpv4Enabled()))
    .setProperty(BaseHazelcastProperties.LOGGING_TYPE_PROP, cluster.getLoggingType())
    .setProperty(BaseHazelcastProperties.MAX_HEARTBEAT_SECONDS_PROP, String.valueOf(cluster.getMaxNoHeartbeatSeconds()));
}

代码示例来源:origin: rancher/cattle

nc.setPublicAddress(dbDiscovery.getLocalConfig().getAdvertiseAddress());
config.setNetworkConfig(nc);

代码示例来源:origin: johnewart/gearman-java

network.setPort(getPort());
network.setPortAutoIncrement(true);
cfg.setNetworkConfig(network);

代码示例来源:origin: org.neo4j/neo4j-core-edge

c.setProperty( GroupProperties.PROP_LOGGING_TYPE, "none" );
c.setNetworkConfig( networkConfig );

代码示例来源:origin: org.neo4j/neo4j-causal-clustering

c.setNetworkConfig( networkConfig );

代码示例来源:origin: bhdrkn/Java-Examples

networkConfig.setPort(5701);
networkConfig.setPortAutoIncrement(true);
config.setNetworkConfig(networkConfig);

代码示例来源:origin: com.erudika/para

cfg.setProperty("hazelcast.health.monitoring.level", "OFF");
if (Config.IN_PRODUCTION) {
  cfg.setNetworkConfig(new NetworkConfig().setJoin(new JoinConfig().
    setMulticastConfig(new MulticastConfig().setEnabled(false)).
      setTcpIpConfig(new TcpIpConfig().setEnabled(false)).

相关文章

Config类方法