Class NodeResources


  • public class NodeResources
    extends java.lang.Object
    The node resources required by an application cluster
    Author:
    bratseth
    • Constructor Detail

      • NodeResources

        @Deprecated
        public NodeResources​(double vcpu,
                             double memoryGb,
                             double diskGb)
        Deprecated.
        Create node resources requiring fast disk and no bandwidth
      • NodeResources

        @Deprecated
        public NodeResources​(double vcpu,
                             double memoryGb,
                             double diskGb,
                             NodeResources.DiskSpeed diskSpeed)
        Deprecated.
        Create node resources requiring no bandwidth
      • NodeResources

        public NodeResources​(double vcpu,
                             double memoryGb,
                             double diskGb,
                             double bandwidthGbps)
        Create node resources requiring fast disk
      • NodeResources

        public NodeResources​(double vcpu,
                             double memoryGb,
                             double diskGb,
                             double bandwidthGbps,
                             NodeResources.DiskSpeed diskSpeed)
    • Method Detail

      • vcpu

        public double vcpu()
      • memoryGb

        public double memoryGb()
      • diskGb

        public double diskGb()
      • bandwidthGbps

        public double bandwidthGbps()
      • withMemoryGb

        public NodeResources withMemoryGb​(double memoryGb)
      • withDiskGb

        public NodeResources withDiskGb​(double diskGb)
      • withBandwidthGbps

        public NodeResources withBandwidthGbps​(double bandwidthGbps)
      • 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
      • satisfies

        public boolean satisfies​(NodeResources other)
        Returns true if all the resources of this are the same or larger than the given resources
      • compatibleWith

        public boolean compatibleWith​(NodeResources other)
        Returns true if all the resources of this are the same as or compatible with the given resources
      • fromLegacyName

        public static NodeResources fromLegacyName​(java.lang.String name)
        Create this from serial form.
        Throws:
        java.lang.IllegalArgumentException - if the given string cannot be parsed as a serial form of this