Class RoundRobinStrategy

java.lang.Object
NetStrategies.RoutingStrategy
NetStrategies.RoutingStrategies.RoundRobinStrategy
All Implemented Interfaces:
AutoCheck

public class RoundRobinStrategy extends RoutingStrategy
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 Details

    • RoundRobinStrategy

      public RoundRobinStrategy()
  • Method Details

    • getOutNode

      public NetNode getOutNode(NetNode ownerNode, JobClass jobClass)
      Gets the output node, into which the job must be routed, using a round robin strategy.
      Specified by:
      getOutNode in class RoutingStrategy
      Parameters:
      ownerNode - Owner node of the output section.
      jobClass - Class of current job to be routed.
      Returns:
      The selected node.