Gets hosts.

@return hosts, may be null.
777580
public String getHosts() {
    if (isReference()) {
      final DistributerDef refDistributer = (DistributerDef) getCheckedRef(DistributerDef.class, "DistributerDef");
      return refDistributer.getHosts();
    }
    return this.hosts;
  }
275214
public String getHostAndPort()
  {
    if (enablePlaintextPort) {
      if (plaintextPort < 0) {
        return HostAndPort.fromString(host).toString();
      } else {
        return HostAndPort.fromParts(host, plaintextPort).toString();
      }
    }
    return null;
  }
1132249
public function host($host = null)
    {
        $this->host = empty($host) ? null : $host;

        return $this->host;
    }
676784
private static String getHostname() {
        if (Hostname == null) {
            try {
                Hostname = InetAddress.getLocalHost().getHostName();
            } catch (Exception e) {
                Hostname = "default";
                LOGGER.warn("Can not get current hostname", e);
            }
        }
        return Hostname;
    }
411713
public java.util.List<String> getHostReservationIdSet() {
        if (hostReservationIdSet == null) {
            hostReservationIdSet = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return hostReservationIdSet;
    }
755528
public function addresses()
    {
        if (Validation::ip($this->_config['host'])) {
            return [$this->_config['host']];
        }

        return gethostbynamel($this->_config['host']);
    }
846923
private HostInfo getClientHost() {
        String host = AppProperties.get(SSRKeys.SSR_CLIENT_HOST).orElse(null);
        if (isEmpty(host)) {
            logger.info("Client host not provided using '{}' to discover host address", discovery.getClass().getSimpleName());
            return discovery.resolveHost();
        } else {
            logger.info("Client host provided: {}", host);
            InetAddress address = tryParse(host);
            if (address != null) {
                return new HostInfo(address.getHostAddress(), address.getHostName());
            }
            return new HostInfo(host, host);
        }
    }
791122
public String[] getProxyHostsWhiteList()
    {
        if (_proxyHostsWhiteList == null || _proxyHostsWhiteList.size() == 0)
            return new String[0];

        String[] hosts = new String[_proxyHostsWhiteList.size()];
        hosts = (String[]) _proxyHostsWhiteList.toArray(hosts);
        return hosts;
    }
1301934
public static String getLocalhost() {
    if (localhost == null) {
      synchronized (HostAndPort.class) {
        if (localhost == null) {
          return localhost = getLocalHostQuietly();
        }
      }
    }
    return localhost;
  }
474389
public String getHost() {
        String hostAndPort = hostAndPort();
        int indexOfMaohao = hostAndPort.indexOf(":");
        if (indexOfMaohao == -1) {
            return hostAndPort;
        } else {
            return hostAndPort.substring(0, indexOfMaohao);
        }
    }
1030177
private String chooseHost(String[] dbHosts) {
        String host = null;
        synchronized (m_lastHostLock) {
            if (dbHosts.length == 1) {
                host = dbHosts[0];
            } else if (!Utils.isEmpty(m_lastHost)) {
                for (int index = 0; host == null && index < dbHosts.length; index++) {
                    if (dbHosts[index].equals(m_lastHost)) {
                        host = dbHosts[(++index) % dbHosts.length];
                    }
                }
            }
            if (host == null) {
                host = dbHosts[new Random().nextInt(dbHosts.length)];
            }
            m_lastHost = host;
        }
        return host;
    }
1206003
public static String getLocalHostAddress() {
		try {
			InetAddress inet = InetAddress.getLocalHost();
			String hostAddress = inet.getHostAddress();
			return hostAddress;
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
		return null;
	}
291477
@Override
    public List<Host> getSeedHosts() {
        List<Host> hosts = new ArrayList<Host>();
        if (seeds != null) {
            for (String seed : seeds.split(",")) {
                seed = seed.trim();
                if (seed.length() > 0) {
                    hosts.add(new Host(seed, this.port));
                }
            }
        }
        return hosts;
    }
54716
public long[] getLocalSites() {
        int hostId = VoltDB.instance().getHostMessenger().getHostId();
        return longListToArray(m_hostsToSitesImmutable.get(hostId));
    }
1030812
public function getUserHost()
    {
        if (isset($this->_userHost)) {
            return $this->_userHost;
        }
        return $this->_userHost = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : null;
    }
378748
public java.util.List<Nameserver> getNameservers() {
        if (nameservers == null) {
            nameservers = new com.amazonaws.internal.SdkInternalList<Nameserver>();
        }
        return nameservers;
    }
1082037
@Override
    public List<String> getVirtualHosts() {
        if (null == this.vhostArray) {
            // nothing here but the api says it returns a non-null empty list
            this.vhostArray = new ArrayList<String>(0);
        }
        return this.vhostArray;
    }