org.elasticsearch.transport.TransportService.getLocalAddresses()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(82)

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

TransportService.getLocalAddresses介绍

暂无

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

public SettingsBasedHostsProvider(Settings settings, TransportService transportService) {
  if (DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.exists(settings)) {
    configuredHosts = DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.get(settings);
    // we only limit to 1 address, makes no sense to ping 100 ports
    limitPortCounts = LIMIT_FOREIGN_PORTS_COUNT;
  } else {
    // if unicast hosts are not specified, fill with simple defaults on the local machine
    configuredHosts = transportService.getLocalAddresses();
    limitPortCounts = LIMIT_LOCAL_PORTS_COUNT;
  }
  logger.debug("using initial hosts {}", configuredHosts);
}

代码示例来源:origin: apache/servicemix-bundles

public SettingsBasedHostsProvider(Settings settings, TransportService transportService) {
  super(settings);
  if (DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.exists(settings)) {
    configuredHosts = DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.get(settings);
    // we only limit to 1 address, makes no sense to ping 100 ports
    limitPortCounts = LIMIT_FOREIGN_PORTS_COUNT;
  } else {
    // if unicast hosts are not specified, fill with simple defaults on the local machine
    configuredHosts = transportService.getLocalAddresses();
    limitPortCounts = LIMIT_LOCAL_PORTS_COUNT;
  }
  logger.debug("using initial hosts {}", configuredHosts);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public SettingsBasedHostsProvider(Settings settings, TransportService transportService) {
  super(settings);
  if (DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.exists(settings)) {
    configuredHosts = DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.get(settings);
    // we only limit to 1 address, makes no sense to ping 100 ports
    limitPortCounts = LIMIT_FOREIGN_PORTS_COUNT;
  } else {
    // if unicast hosts are not specified, fill with simple defaults on the local machine
    configuredHosts = transportService.getLocalAddresses();
    limitPortCounts = LIMIT_LOCAL_PORTS_COUNT;
  }
  logger.debug("using initial hosts {}", configuredHosts);
}

代码示例来源:origin: harbby/presto-connectors

hosts.addAll(transportService.getLocalAddresses());
} else {

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

} else {
  configuredHosts = transportService.getLocalAddresses();
  limitPortCounts = LIMIT_LOCAL_PORTS_COUNT;

相关文章

微信公众号

最新文章

更多

TransportService类方法