Enum InstancePricingPreference

java.lang.Object
java.lang.Enum<InstancePricingPreference>
co.yellowdog.platform.model.InstancePricingPreference
All Implemented Interfaces:
Serializable, Comparable<InstancePricingPreference>, java.lang.constant.Constable

public enum InstancePricingPreference extends Enum<InstancePricingPreference>
The preferred InstancePricing when running a TaskGroup. This affects upscaling and claiming.

ON_DEMAND_ONLY and SPOT_ONLY are restrictive. They prevent using compute that is not On-Demand and Spot respectively. These restrictions apply differently in upscaling and claiming. When upscaling, the restriction applies to the WorkerPool as a whole — a pool mixing Spot and On-Demand sources is not eligible. When claiming, the restriction applies per Worker — a worker in a mixed pool is still eligible if it individually satisfies the pricing requirement.

ON_DEMAND_THEN_SPOT and SPOT_THEN_ON_DEMAND alter the priority of WorkerPools when upscaling, and of Workers when claiming.

See Also:
  • Enum Constant Details

    • ON_DEMAND_ONLY

      public static final InstancePricingPreference ON_DEMAND_ONLY
      When upscaling, only WorkerPools that exclusively provision On-Demand compute. When claiming, only use Workers running on On-Demand compute.
    • SPOT_ONLY

      public static final InstancePricingPreference SPOT_ONLY
      When upscaling, only WorkerPools that exclusively provision Spot compute. When claiming, only use Workers running on Spot compute.
    • ON_DEMAND_THEN_SPOT

      public static final InstancePricingPreference ON_DEMAND_THEN_SPOT
      When upscaling, order WorkerPools by those that:
      1. Only create On-Demand compute
      2. Create On-Demand and Spot compute
      3. Only create Spot compute

      When claiming, order Workers by those running on:

      1. On-Demand compute
      2. Spot compute
      3. Configured compute
    • SPOT_THEN_ON_DEMAND

      public static final InstancePricingPreference SPOT_THEN_ON_DEMAND
      When upscaling, order WorkerPools by those that:
      1. Only create Spot compute
      2. Create On-Demand and Spot compute
      3. Only create On-Demand compute

      When claiming, order Workers by those running on:

      1. Spot compute
      2. On-Demand compute
      3. Configured compute
  • Method Details

    • values

      public static InstancePricingPreference[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static InstancePricingPreference valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null