Class RandomStrategy

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

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

    • RandomStrategy

      public RandomStrategy()
  • Method Details

    • getOutNode

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