Enum HeteroSchedPolicy

java.lang.Object
java.lang.Enum<HeteroSchedPolicy>
jline.lang.constant.HeteroSchedPolicy
All Implemented Interfaces:
Serializable, Comparable<HeteroSchedPolicy>, java.lang.constant.Constable

public enum HeteroSchedPolicy extends Enum<HeteroSchedPolicy>
Enumeration of scheduling policies for heterogeneous multiserver queues.

These policies determine how jobs are assigned to servers when multiple server types are available and a job's class is compatible with more than one server type.

The policies are based on JMT's heterogeneous server scheduling:

  • ORDER - Assign to first available compatible server type (in definition order)
  • ALIS - Assign Longest Idle Server
  • ALFS - Assign Longest Free Server (with fairness sorting)
  • FAIRNESS - Fair distribution across compatible server types
  • FSF - Fastest Server First (based on expected service time)
  • RAIS - Random Available Idle Server
  • Enum Constant Details

    • ORDER

      public static final HeteroSchedPolicy ORDER
      Assign to first available compatible server type in definition order. This is the default policy. Servers are checked in the order they were added to the queue, and the first compatible server with availability is used.
    • ALIS

      public static final HeteroSchedPolicy ALIS
      Assign Longest Idle Server. Servers cycle through in order, with fully busy servers moving to the back of the list. Provides round-robin behavior among compatible servers.
    • ALFS

      public static final HeteroSchedPolicy ALFS
      Assign Longest Free Server with fairness sorting. Server types are sorted by compatibility coverage (servers with exclusive classes first), then all servers cycle together to ensure fairness.
    • FAIRNESS

      public static final HeteroSchedPolicy FAIRNESS
      Fair distribution across compatible server types. Simple round-robin among compatible servers, with used servers moving to the back of the list.
    • FSF

      public static final HeteroSchedPolicy FSF
      Fastest Server First. Always selects the compatible server type with the fastest expected service time for the job's class. Optimizes for lowest latency.
    • RAIS

      public static final HeteroSchedPolicy RAIS
      Random Available Idle Server. Randomly selects among compatible server types that have available capacity.
  • Method Details

    • values

      public static HeteroSchedPolicy[] 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 HeteroSchedPolicy 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
    • fromText

      public static HeteroSchedPolicy fromText(String text)
      Converts a string representation to a HeteroSchedPolicy enum value.
      Parameters:
      text - the string representation (case-insensitive)
      Returns:
      the corresponding HeteroSchedPolicy enum value
      Throws:
      IllegalArgumentException - if the string is not recognized
    • toText

      public String toText()
      Converts this policy to its text representation.
      Returns:
      the text representation of this policy
    • toText

      public static String toText(HeteroSchedPolicy policy)
      Converts a HeteroSchedPolicy to its text representation.
      Parameters:
      policy - the policy to convert
      Returns:
      the text representation
    • toJMTText

      public String toJMTText()
      Converts this policy to JMT's descriptive label (e.g. "ALIS (Assign Longest Idle Server)"). JMT's engine compares schedulingPolicy XML values against these long forms, so the JMT writer must use this method rather than toText().
      Returns:
      the JMT-compatible descriptive label
    • toJMTText

      public static String toJMTText(HeteroSchedPolicy policy)