Class HostSystem

  • All Implemented Interfaces:
    com.yahoo.config.ConfigInstance.Producer, ConfigProducer, java.io.Serializable

    public class HostSystem
    extends AbstractConfigProducer<Host>
    The parent node for all Host instances, and thus accessible to enable services to get their Host.
    Author:
    gjoranv
    See Also:
    Serialized Form
    • Constructor Detail

      • HostSystem

        public HostSystem​(AbstractConfigProducer<?> parent,
                          java.lang.String name,
                          com.yahoo.config.model.api.HostProvisioner provisioner,
                          com.yahoo.config.application.api.DeployLogger deployLogger)
    • Method Detail

      • getHostByHostname

        public HostResource getHostByHostname​(java.lang.String name)
        Returns the host with the given hostname.
        Parameters:
        name - the hostname of the host
        Returns:
        the host with the given hostname, or null if no such host
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getHost

        public HostResource getHost​(java.lang.String hostAlias)
      • getHosts

        public java.util.List<HostResource> getHosts()
        Returns the hosts owned by the application having this system - i.e all hosts except config servers
      • dumpPortAllocations

        public void dumpPortAllocations()
      • allocateHosts

        public java.util.Map<HostResource,​com.yahoo.config.provision.ClusterMembership> allocateHosts​(com.yahoo.config.provision.ClusterSpec cluster,
                                                                                                            com.yahoo.config.provision.Capacity capacity,
                                                                                                            com.yahoo.config.application.api.DeployLogger logger)
      • addBoundHost

        public void addBoundHost​(HostResource host)