Class RoundRobinStrategy
java.lang.Object
NetStrategies.RoutingStrategy
NetStrategies.RoutingStrategies.RoundRobinStrategy
- All Implemented Interfaces:
AutoCheck
This class implements a round robin strategy: all the output nodes
are chosen in sequence, one at each time; when all the nodes have been chosen,
the sequence restarts.
- Author:
- Francesco Radaelli, Bertoli Marco Modified by Bertoli Marco to correct behaviour with closed classes and sinks
-
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 round robin strategy.Methods inherited from class RoutingStrategy
check, getOutNode, getOutNode
-
Constructor Details
-
RoundRobinStrategy
public RoundRobinStrategy()
-
-
Method Details
-
getOutNode
Gets the output node, into which the job must be routed, using a round robin strategy.- Specified by:
getOutNodein classRoutingStrategy- Parameters:
ownerNode- Owner node of the output section.jobClass- Class of current job to be routed.- Returns:
- The selected node.
-