Class ClusterResources


  • public class ClusterResources
    extends java.lang.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
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object