Class PropertyBasedStrategy
java.lang.Object
NetStrategies.RoutingStrategy
NetStrategies.RoutingStrategies.PropertyBasedStrategy
- All Implemented Interfaces:
AutoCheck
- Direct Known Subclasses:
PowerOfKRoutingStrategy
Routing strategy that selects the destination station based on a property of the stations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract doublecalculateProperty(NetNode node, JobClass jobClass) protected final intcalculateQueueLength(NetNode node, boolean isClosedClass) getOutNode(NetNode ownerNode, JobClass jobClass) This method should be overridden to implement a specific strategy.protected final intgetRandomIndexBelow(int max, RandomEngine randomEngine) Methods inherited from class RoutingStrategy
check, getOutNode, getOutNode
-
Constructor Details
-
PropertyBasedStrategy
public PropertyBasedStrategy()
-
-
Method Details
-
getOutNode
Description copied from class:RoutingStrategyThis method should be overridden to implement a specific strategy.- Specified by:
getOutNodein classRoutingStrategy- Parameters:
ownerNode- Owner node of the output section.jobClass- Class of current job to be routed.- Returns:
- Selected node.
-
calculateProperty
- Throws:
NetException
-
getRandomIndexBelow
-
calculateQueueLength
- Throws:
NetException
-