Package jline.lang.constant
Enum HeteroSchedPolicy
- All Implemented Interfaces:
Serializable,Comparable<HeteroSchedPolicy>,java.lang.constant.Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAssign Longest Free Server with fairness sorting.Assign Longest Idle Server.Fair distribution across compatible server types.Fastest Server First.Assign to first available compatible server type in definition order.Random Available Idle Server. -
Method Summary
Modifier and TypeMethodDescriptionstatic HeteroSchedPolicyConverts a string representation to a HeteroSchedPolicy enum value.Converts this policy to JMT's descriptive label (e.g.static StringtoJMTText(HeteroSchedPolicy policy) toText()Converts this policy to its text representation.static StringtoText(HeteroSchedPolicy policy) Converts a HeteroSchedPolicy to its text representation.static HeteroSchedPolicyReturns the enum constant of this type with the specified name.static HeteroSchedPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
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
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
Fair distribution across compatible server types. Simple round-robin among compatible servers, with used servers moving to the back of the list. -
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
Random Available Idle Server. Randomly selects among compatible server types that have available capacity.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromText
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
Converts this policy to its text representation.- Returns:
- the text representation of this policy
-
toText
Converts a HeteroSchedPolicy to its text representation.- Parameters:
policy- the policy to convert- Returns:
- the text representation
-
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 thantoText().- Returns:
- the JMT-compatible descriptive label
-
toJMTText
-