Package com.yahoo.config.provision
Class Capacity
java.lang.Object
com.yahoo.config.provision.Capacity
A capacity request.
- Author:
- Ulf Lilleengen, bratseth
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canFail()
Returns true if an exception should be thrown if the specified capacity can not be satisfied (to whatever policies are applied and taking required true/false into account).Returns the cloud account where this capacity is requestedstatic Capacity
from
(ClusterResources resources) Create a non-required, failable capacity requeststatic Capacity
from
(ClusterResources resources, boolean required, boolean canFail) static Capacity
from
(ClusterResources min, ClusterResources max) Create a non-required, failable capacity requeststatic Capacity
from
(ClusterResources min, ClusterResources max, boolean required, boolean canFail) static Capacity
from
(ClusterResources min, ClusterResources max, boolean required, boolean canFail, Optional<CloudAccount> cloudAccount) static Capacity
from
(ClusterResources min, ClusterResources max, IntRange groupSize, boolean required, boolean canFail, Optional<CloudAccount> cloudAccount) static Capacity
from
(ClusterResources min, ClusterResources max, IntRange groupSize, boolean required, boolean canFail, Optional<CloudAccount> cloudAccount, ClusterInfo clusterInfo) static Capacity
fromRequiredNodeType
(NodeType type) Creates this from a node typeboolean
Returns whether the requested number of nodes must be met exactly for a request for this to succeedtoString()
type()
Returns the node type (role) requested.withLimits
(ClusterResources min, ClusterResources max) withLimits
(ClusterResources min, ClusterResources max, IntRange groupSize)
-
Method Details
-
minResources
-
maxResources
-
groupSize
-
isRequired
public boolean isRequired()Returns whether the requested number of nodes must be met exactly for a request for this to succeed -
canFail
public boolean canFail()Returns true if an exception should be thrown if the specified capacity can not be satisfied (to whatever policies are applied and taking required true/false into account). Returns false if it is preferable to still succeed with partially satisfied capacity. -
type
Returns the node type (role) requested. This is tenant nodes by default. If some other type is requested the node count and flavor may be ignored and all nodes of the requested type returned instead. -
cloudAccount
Returns the cloud account where this capacity is requested -
clusterInfo
-
withLimits
-
withLimits
-
toString
-
from
Create a non-required, failable capacity request -
from
Create a non-required, failable capacity request -
from
-
from
public static Capacity from(ClusterResources min, ClusterResources max, IntRange groupSize, boolean required, boolean canFail, Optional<CloudAccount> cloudAccount) -
from
public static Capacity from(ClusterResources min, ClusterResources max, boolean required, boolean canFail) -
from
public static Capacity from(ClusterResources min, ClusterResources max, boolean required, boolean canFail, Optional<CloudAccount> cloudAccount) -
from
public static Capacity from(ClusterResources min, ClusterResources max, IntRange groupSize, boolean required, boolean canFail, Optional<CloudAccount> cloudAccount, ClusterInfo clusterInfo) -
fromRequiredNodeType
Creates this from a node type
-