Class Capacity


  • public final class Capacity
    extends java.lang.Object
    A capacity request.
    Author:
    Ulf Lilleengen, bratseth
    • Method Detail

      • 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

        public NodeType 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.
      • withGroups

        public Capacity withGroups​(int groups)
      • toString

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

        public static Capacity fromRequiredNodeType​(NodeType type)
        Creates this from a node type