Class ClusterResources


  • public class ClusterResources
    extends Object
    The resources of a cluster
    Author:
    bratseth
    • 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()
      • 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
      • totalResources

        public NodeResources totalResources()
        Returns the total resources of this, that is the number of nodes times the node resources
      • cost

        public double cost()
        Returns the standard cost of these resources, in dollars per hour
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object