Class Flavor


  • public class Flavor
    extends java.lang.Object
    A host or node flavor. *Host* flavors come from a configured set which corresponds to the actual flavors available in a zone. *Node* flavors are simply a wrapper of a NodeResources object.
    Author:
    bratseth
    • Constructor Detail

      • Flavor

        public Flavor​(FlavorsConfig.Flavor flavorConfig)
        Creates a *host* flavor from configuration
      • Flavor

        public Flavor​(NodeResources resources)
        Creates a *node* flavor from a node resources spec
      • Flavor

        public Flavor​(java.lang.String name,
                      NodeResources resources)
        Creates a *host* flavor for testing
    • Method Detail

      • name

        public java.lang.String name()
        Returns the unique identity of this flavor if it is configured, or the resource spec string otherwise
      • cost

        public int cost()
        Get the monthly cost (total cost of ownership) in USD for this flavor, typically total cost divided by 36 months.
        Returns:
        monthly cost in USD
      • isConfigured

        public boolean isConfigured()
        True if this is a configured flavor used for hosts, false if it is a virtual flavor created on the fly from node resources
      • flavorOverrides

        public java.util.Optional<FlavorOverrides> flavorOverrides()
      • getMinMainMemoryAvailableGb

        @Deprecated
        public double getMinMainMemoryAvailableGb()
        Deprecated.
      • getMinDiskAvailableGb

        @Deprecated
        public double getMinDiskAvailableGb()
        Deprecated.
      • hasFastDisk

        @Deprecated
        public boolean hasFastDisk()
        Deprecated.
      • getBandwidthGbps

        @Deprecated
        public double getBandwidthGbps()
        Deprecated.
      • getMinCpuCores

        @Deprecated
        public double getMinCpuCores()
        Deprecated.
        Returns the number of cores available in this flavor, not scaled for speed.
      • isDocker

        public boolean isDocker()
        Convenience, returns getType() == Type.DOCKER_CONTAINER
      • hashCode

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

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

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