Package com.yahoo.config.provision
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClusterSpec.Builder
static class
ClusterSpec.Group
Identifier of a group within a clusterstatic class
ClusterSpec.Id
static class
ClusterSpec.Type
A cluster type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<ClusterSpec.Id>
combinedId()
Returns the ID of the container cluster that is combined with this.Optional<String>
dockerImage()
Returns the docker image (repository + vespa version) we want this cluster to runOptional<DockerImage>
dockerImageRepo()
Returns the docker image repository part of a docker image we want this cluster to runboolean
equals(Object o)
ClusterSpec
exclusive(boolean exclusive)
Optional<ClusterSpec.Group>
group()
Returns the group within the cluster this specifies, or empty to specify the whole clusterint
hashCode()
ClusterSpec.Id
id()
Returns the cluster idboolean
isExclusive()
Returns whether the physical hosts running the nodes of this application can also run nodes of other applications.boolean
isStateful()
Returns whether this cluster has statestatic ClusterSpec.Builder
request(ClusterSpec.Type type, ClusterSpec.Id id)
Creates a ClusterSpec when requesting a clusterboolean
satisfies(ClusterSpec other)
Returns whether this satisfies other for allocation purposes.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 setString
toString()
ClusterSpec.Type
type()
Returns the cluster typecom.yahoo.component.Version
vespaVersion()
Returns the version of Vespa that we want this cluster to runClusterSpec
with(Optional<ClusterSpec.Group> newGroup)
-
-
-
Method Detail
-
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
-
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)
-
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
-
satisfies
public boolean satisfies(ClusterSpec other)
Returns whether this satisfies other for allocation purposes. Only considers cluster ID and type, other fields are ignored.
-
-