Class Host

All Implemented Interfaces:
com.yahoo.cloud.config.SentinelConfig.Producer, com.yahoo.config.ConfigInstance.Producer, ConfigProducer, Serializable, Comparable<Host>

public final class Host extends TreeConfigProducer<TreeConfigProducer<?>> implements com.yahoo.cloud.config.SentinelConfig.Producer, Comparable<Host>
A physical host, running a set of services. The identity of a host is its hostname. Hosts are comparable on their host name.
Author:
gjoranv
See Also:
  • Constructor Details

    • Host

      public Host(TreeConfigProducer<? super Host> parent, String hostname)
      Constructs a new Host instance.
      Parameters:
      parent - parent TreeConfigProducer in the config model.
      hostname - hostname for this host.
  • Method Details

    • createConfigServerHost

      public static Host createConfigServerHost(HostSystem hostSystem, String hostname)
    • createHost

      public static Host createHost(HostSystem hostSystem, String hostname)
    • getHostname

      public String getHostname()
    • runsConfigServer

      public boolean runsConfigServer()
    • toString

      public String toString()
      Returns the string representation of this Host object.
      Overrides:
      toString in class Object
    • getConfig

      public void getConfig(com.yahoo.cloud.config.SentinelConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.cloud.config.SentinelConfig.Producer
    • setConfigSentinel

      public void setConfigSentinel(ConfigSentinel configSentinel)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(Host other)
      Specified by:
      compareTo in interface Comparable<Host>