Package jline.lang.constant
Enum RoutingStrategy
- All Implemented Interfaces:
Serializable,Comparable<RoutingStrategy>,java.lang.constant.Constable
Enumeration of routing strategies that determine how jobs are dispatched to downstream stations.
Routing strategies control the decision-making process when a job completes service at a station and multiple downstream stations are available. These strategies implement different load balancing, fairness, and optimization policies.
Common strategies include:
- RAND - Random selection with equal probability
- PROB - Probabilistic routing with specified probabilities
- RROBIN - Round-robin cycling through destinations
- JSQ - Join the Shortest Queue for load balancing
- Since:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDisabled routing - no routing allowed (jobs are dropped)Firing routing - used for transitions in Petri net modelsJoin Shortest Queue - route to destination with fewest waiting jobsPower of K choices - select best among K randomly chosen destinationsProbabilistic routing - destination selected according to specified probabilitiesRandom routing - destination selected uniformly at randomReinforcement Learning - adaptive routing based on learned policiesRound Robin - destinations visited in cyclic orderWeighted Round Robin - cyclic routing with weighted visits -
Method Summary
Modifier and TypeMethodDescriptionstatic StringtoFeature(RoutingStrategy routing) Converts a RoutingStrategy enum value to a feature string for analysis.static RoutingStrategyReturns the enum constant of this type with the specified name.static RoutingStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RAND
Random routing - destination selected uniformly at random -
PROB
Probabilistic routing - destination selected according to specified probabilities -
RROBIN
Round Robin - destinations visited in cyclic order -
WRROBIN
Weighted Round Robin - cyclic routing with weighted visits -
JSQ
Join Shortest Queue - route to destination with fewest waiting jobs -
FIRING
Firing routing - used for transitions in Petri net models -
KCHOICES
Power of K choices - select best among K randomly chosen destinations -
RL
Reinforcement Learning - adaptive routing based on learned policies -
DISABLED
Disabled routing - no routing allowed (jobs are dropped)
-
-
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
-
toFeature
Converts a RoutingStrategy enum value to a feature string for analysis.- Parameters:
routing- the routing strategy to convert- Returns:
- the feature string representation, or empty string if not mapped
-