Package com.yahoo.config.provision
Class ClusterSpec
- java.lang.Object
-
- com.yahoo.config.provision.ClusterSpec
-
public final class ClusterSpec extends java.lang.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.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 boolean
equals(java.lang.Object o)
boolean
equalsIgnoringGroupAndVespaVersion(java.lang.Object o)
Returns whether this is equal, disregarding the group value and wanted Vespa versionClusterSpec
exclusive(boolean exclusive)
static ClusterSpec
from(ClusterSpec.Type type, ClusterSpec.Id id, ClusterSpec.Group groupId, com.yahoo.component.Version vespaVersion, boolean exclusive)
java.util.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.static ClusterSpec
request(ClusterSpec.Type type, ClusterSpec.Id id, com.yahoo.component.Version vespaVersion, boolean exclusive)
java.lang.String
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(java.util.Optional<ClusterSpec.Group> newGroup)
-
-
-
Method Detail
-
type
public ClusterSpec.Type type()
Returns the cluster type
-
id
public ClusterSpec.Id id()
Returns the cluster id
-
vespaVersion
public com.yahoo.component.Version vespaVersion()
Returns the version of Vespa that we want this cluster to run
-
group
public java.util.Optional<ClusterSpec.Group> group()
Returns the group within the cluster this specifies, or empty to specify the whole cluster
-
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 increases cost.
-
with
public ClusterSpec with(java.util.Optional<ClusterSpec.Group> newGroup)
-
exclusive
public ClusterSpec exclusive(boolean exclusive)
-
request
public static ClusterSpec request(ClusterSpec.Type type, ClusterSpec.Id id, com.yahoo.component.Version vespaVersion, boolean exclusive)
-
from
public static ClusterSpec from(ClusterSpec.Type type, ClusterSpec.Id id, ClusterSpec.Group groupId, com.yahoo.component.Version vespaVersion, boolean exclusive)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
equalsIgnoringGroupAndVespaVersion
public boolean equalsIgnoringGroupAndVespaVersion(java.lang.Object o)
Returns whether this is equal, disregarding the group value and wanted Vespa version
-
-