Class NodeFlavors


  • public class NodeFlavors
    extends java.lang.Object
    All the flavors configured in this zone (i.e this should be called HostFlavors).
    Author:
    bratseth
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exists​(java.lang.String flavorName)
      Returns true if this flavor is configured or can be created on the fly
      java.util.Optional<Flavor> getFlavor​(java.lang.String name)
      Returns a flavor by name, or empty if there is no flavor with this name and it cannot be created on the fly.
      Flavor getFlavorOrThrow​(java.lang.String flavorName)
      Returns the flavor with the given name or throws an IllegalArgumentException if it does not exist and cannot be created on the fly.
      java.util.List<Flavor> getFlavors()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NodeFlavors

        @Inject
        public NodeFlavors​(FlavorsConfig config)
    • Method Detail

      • getFlavors

        public java.util.List<Flavor> getFlavors()
      • getFlavor

        public java.util.Optional<Flavor> getFlavor​(java.lang.String name)
        Returns a flavor by name, or empty if there is no flavor with this name and it cannot be created on the fly.
      • getFlavorOrThrow

        public Flavor getFlavorOrThrow​(java.lang.String flavorName)
        Returns the flavor with the given name or throws an IllegalArgumentException if it does not exist and cannot be created on the fly.
      • exists

        public boolean exists​(java.lang.String flavorName)
        Returns true if this flavor is configured or can be created on the fly