Class ClusterSpec

java.lang.Object
com.yahoo.config.provision.ClusterSpec

public final class ClusterSpec extends Object
A specification of a cluster - or group in a grouped cluster - to be run on a set of hosts. This is a value object.
Author:
bratseth
  • Method Details

    • type

      public ClusterSpec.Type type()
      Returns the cluster type
    • id

      public ClusterSpec.Id id()
      Returns the cluster id
    • dockerImageRepo

      public Optional<DockerImage> dockerImageRepo()
      Returns the docker image repository part of a docker image we want this cluster to run
    • dockerImage

      public Optional<String> dockerImage()
      Returns the docker image (repository + vespa version) we want this cluster to run
    • loadBalancerSettings

      public LoadBalancerSettings loadBalancerSettings()
      Returns any additional load balancer settings for application container clusters.
    • vespaVersion

      public com.yahoo.component.Version vespaVersion()
      Returns the version of Vespa that we want this cluster to run
    • group

      public Optional<ClusterSpec.Group> group()
      Returns the group within the cluster this specifies, or empty to specify the whole cluster
    • combinedId

      public Optional<ClusterSpec.Id> combinedId()
      Returns the ID of the container cluster that is combined with this. This is only present for combined clusters
    • isExclusive

      public boolean isExclusive()
      Returns whether the physical hosts running the nodes of this application can also run nodes of other applications. Using exclusive nodes for containers increases security and cost.
    • isStateful

      public boolean isStateful()
      Returns whether this cluster has state
    • with

      public ClusterSpec with(Optional<ClusterSpec.Group> newGroup)
    • withExclusivity

      public ClusterSpec withExclusivity(boolean exclusive)
    • exclusive

      public ClusterSpec exclusive(boolean exclusive)
    • request

      public static ClusterSpec.Builder request(ClusterSpec.Type type, ClusterSpec.Id id)
      Creates a ClusterSpec when requesting a cluster
    • specification

      public static ClusterSpec.Builder specification(ClusterSpec.Type type, ClusterSpec.Id id)
      Creates a ClusterSpec for an existing cluster, group id and Vespa version needs to be set
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public boolean satisfies(ClusterSpec other)
      Returns whether this satisfies other for allocation purposes. Only considers cluster ID and type, other fields are ignored.