Package com.yahoo.config.provision
Class ClusterResources
- java.lang.Object
-
- com.yahoo.config.provision.ClusterResources
-
public class ClusterResources extends java.lang.Object
The resources of a cluster- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description ClusterResources(int nodes, int groups, NodeResources nodeResources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
groups()
int
hashCode()
boolean
isWithin(ClusterResources min, ClusterResources max)
Returns true if this is within the given limits (inclusive) and is compatible with themNodeResources
nodeResources()
int
nodes()
Returns the total number of allocated nodes (over all groups)boolean
smallerThan(ClusterResources other)
Returns true if this is smaller than the given resources in any dimensionjava.lang.String
toString()
ClusterResources
with(NodeResources resources)
ClusterResources
withGroups(int groups)
-
-
-
Constructor Detail
-
ClusterResources
public ClusterResources(int nodes, int groups, NodeResources nodeResources)
-
-
Method Detail
-
nodes
public int nodes()
Returns the total number of allocated nodes (over all groups)
-
groups
public int groups()
-
nodeResources
public NodeResources nodeResources()
-
with
public ClusterResources with(NodeResources resources)
-
withGroups
public ClusterResources withGroups(int groups)
-
smallerThan
public boolean smallerThan(ClusterResources other)
Returns true if this is smaller than the given resources in any dimension
-
isWithin
public boolean isWithin(ClusterResources min, ClusterResources max)
Returns true if this is within the given limits (inclusive) and is compatible with them
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-