Package com.yahoo.config.provision
Class HostSpec
- java.lang.Object
-
- com.yahoo.config.provision.HostSpec
-
- All Implemented Interfaces:
Comparable<HostSpec>
public class HostSpec extends Object implements Comparable<HostSpec>
A specification of a host and its role. Equality and order is determined by the host name.- Author:
- hmusum
-
-
Constructor Summary
Constructors Constructor Description HostSpec(String hostname, NodeResources realResources, NodeResources advertisedResources, NodeResources requestedResources, ClusterMembership membership, Optional<com.yahoo.component.Version> version, Optional<NetworkPorts> networkPorts, Optional<DockerImage> dockerImageRepo)
Create a host in a hosted systemHostSpec(String hostname, List<String> aliases, Optional<NetworkPorts> networkPorts)
Create a host in a non-cloud system, where hosts are specified in config
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeResources
advertisedResources()
The total advertised resources of this node, typically matching what's requested.List<String>
aliases()
Returns the aliases of this host as an immutable list.int
compareTo(HostSpec other)
Optional<DockerImage>
dockerImageRepo()
boolean
equals(Object other)
int
hashCode()
String
hostname()
Returns the name identifying this hostOptional<ClusterMembership>
membership()
Returns the membership of this host, or an empty value if not presentOptional<NetworkPorts>
networkPorts()
Returns the network port allocations on this host, or empty if not presentNodeResources
realResources()
The real resources available for Vespa processes on this node, after subtracting infrastructure overhead.Optional<NodeResources>
requestedResources()
Returns the requested resources leading to this host being provisioned, or empty if unspecifiedString
toString()
Optional<com.yahoo.component.Version>
version()
Returns the current version of Vespa running on this node, or empty if not knownHostSpec
withPorts(Optional<NetworkPorts> ports)
-
-
-
Constructor Detail
-
HostSpec
public HostSpec(String hostname, List<String> aliases, Optional<NetworkPorts> networkPorts)
Create a host in a non-cloud system, where hosts are specified in config
-
HostSpec
public HostSpec(String hostname, NodeResources realResources, NodeResources advertisedResources, NodeResources requestedResources, ClusterMembership membership, Optional<com.yahoo.component.Version> version, Optional<NetworkPorts> networkPorts, Optional<DockerImage> dockerImageRepo)
Create a host in a hosted system
-
-
Method Detail
-
hostname
public String hostname()
Returns the name identifying this host
-
aliases
public List<String> aliases()
Returns the aliases of this host as an immutable list. This may be empty but never null.
-
realResources
public NodeResources realResources()
The real resources available for Vespa processes on this node, after subtracting infrastructure overhead.
-
advertisedResources
public NodeResources advertisedResources()
The total advertised resources of this node, typically matching what's requested.
-
version
public Optional<com.yahoo.component.Version> version()
Returns the current version of Vespa running on this node, or empty if not known
-
membership
public Optional<ClusterMembership> membership()
Returns the membership of this host, or an empty value if not present
-
networkPorts
public Optional<NetworkPorts> networkPorts()
Returns the network port allocations on this host, or empty if not present
-
requestedResources
public Optional<NodeResources> requestedResources()
Returns the requested resources leading to this host being provisioned, or empty if unspecified
-
dockerImageRepo
public Optional<DockerImage> dockerImageRepo()
-
withPorts
public HostSpec withPorts(Optional<NetworkPorts> ports)
-
compareTo
public int compareTo(HostSpec other)
- Specified by:
compareTo
in interfaceComparable<HostSpec>
-
-