Class RandomStrategy
java.lang.Object
NetStrategies.RoutingStrategy
NetStrategies.RoutingStrategies.RandomStrategy
- All Implemented Interfaces:
AutoCheck
This class implements a random strategy: the output node
is chosen with a random number
- Version:
- 13/11/2005 Reimplemented by Bertoli Marco to correct behaviour with closed classes and sinks
- Author:
- Stefano Omini, Bertoli Marco
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOutNode(NetNode ownerNode, JobClass jobClass) Gets the output node, into which the job must be routed, using a random strategy.Methods inherited from class RoutingStrategy
check, getOutNode, getOutNode
-
Constructor Details
-
RandomStrategy
public RandomStrategy()
-
-
Method Details
-
getOutNode
Gets the output node, into which the job must be routed, using a random strategy.- Specified by:
getOutNodein classRoutingStrategy- Parameters:
ownerNode- Owner node of the output section.jobClass- Class of current job to be routed.- Returns:
- Selected node.
-