Class NodesSpecification
java.lang.Object
com.yahoo.vespa.model.builder.xml.dom.NodesSpecification
A common utility class to represent a requirement for nodes during model building.
Such a requirement is commonly specified in services.xml as a
nodes element.- Author:
- bratseth
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodesSpecificationdedicated(int count, ConfigModelContext context) Returns a requirement fromcountdedicated nodes in one groupstatic NodesSpecificationfrom(ModelElement nodesElement, ConfigModelContext context) Returns a requirement for dedicated nodes taken from the givennodeselementcom.yahoo.config.provision.IntRangebooleanReturns whether the count attribute was present on the<nodes>element.booleanReturns whether this requires dedicated nodes.booleanReturns whether the physical hosts running the nodes of this application can also run nodes of other applications.com.yahoo.config.provision.ClusterResourcescom.yahoo.config.provision.ClusterResourcesstatic NodesSpecificationnonDedicated(int count, ConfigModelContext context) Returns a requirement fromcountnon-dedicated nodes in one groupstatic Optional<NodesSpecification>optionalDedicatedFromParent(ModelElement parentElement, ConfigModelContext context) Returns a requirement for non-dedicated or dedicated nodes taken from thenodeselement contained in the given parent element, or empty if the parent element is null, or the nodes elements is not present.Map<HostResource,com.yahoo.config.provision.ClusterMembership> provision(HostSystem hostSystem, com.yahoo.config.provision.ClusterSpec.Type clusterType, com.yahoo.config.provision.ClusterSpec.Id clusterId, com.yahoo.config.application.api.DeployLogger logger, boolean stateful, com.yahoo.config.provision.ClusterInfo clusterInfo) Map<HostResource,com.yahoo.config.provision.ClusterMembership> provision(HostSystem hostSystem, com.yahoo.config.provision.ClusterSpec.Type clusterType, com.yahoo.config.provision.ClusterSpec.Id clusterId, com.yahoo.config.provision.ZoneEndpoint zoneEndpoint, com.yahoo.config.application.api.DeployLogger logger, boolean stateful, com.yahoo.config.provision.ClusterInfo info) static NodesSpecificationrequiredFromSharedParents(int count, com.yahoo.config.provision.NodeResources resources, ModelElement element, ConfigModelContext context) Returns a requirement forcountshared nodes withrequiredtaken as the OR over all content clusters, and with the given resources.toString()
-
Method Details
-
from
Returns a requirement for dedicated nodes taken from the givennodeselement -
optionalDedicatedFromParent
public static Optional<NodesSpecification> optionalDedicatedFromParent(ModelElement parentElement, ConfigModelContext context) Returns a requirement for non-dedicated or dedicated nodes taken from thenodeselement contained in the given parent element, or empty if the parent element is null, or the nodes elements is not present. -
nonDedicated
Returns a requirement fromcountnon-dedicated nodes in one group -
dedicated
Returns a requirement fromcountdedicated nodes in one group -
minResources
public com.yahoo.config.provision.ClusterResources minResources() -
maxResources
public com.yahoo.config.provision.ClusterResources maxResources() -
groupSize
public com.yahoo.config.provision.IntRange groupSize() -
isDedicated
public boolean isDedicated()Returns whether this requires dedicated nodes. Otherwise the model encountering this request should reuse nodes requested for other purposes whenever possible. -
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. -
hasCountAttribute
public boolean hasCountAttribute()Returns whether the count attribute was present on the<nodes>element. -
provision
public Map<HostResource,com.yahoo.config.provision.ClusterMembership> provision(HostSystem hostSystem, com.yahoo.config.provision.ClusterSpec.Type clusterType, com.yahoo.config.provision.ClusterSpec.Id clusterId, com.yahoo.config.application.api.DeployLogger logger, boolean stateful, com.yahoo.config.provision.ClusterInfo clusterInfo) -
provision
public Map<HostResource,com.yahoo.config.provision.ClusterMembership> provision(HostSystem hostSystem, com.yahoo.config.provision.ClusterSpec.Type clusterType, com.yahoo.config.provision.ClusterSpec.Id clusterId, com.yahoo.config.provision.ZoneEndpoint zoneEndpoint, com.yahoo.config.application.api.DeployLogger logger, boolean stateful, com.yahoo.config.provision.ClusterInfo info) -
toString
-