Class RoutingStrategy

java.lang.Object
NetStrategies.RoutingStrategy
All Implemented Interfaces:
AutoCheck
Direct Known Subclasses:
ClassSwitchRoutingStrategy, DisabledRoutingStrategy, EmpiricalStrategy, FastestServiceRoutingStrategy, LeastUtilizationRoutingStrategy, LoadDependentRoutingStrategy, PropertyBasedStrategy, RandomStrategy, RoundRobinStrategy, ShortestQueueLengthRoutingStrategy, ShortestResponseTimeRoutingStrategy, WeightedRoundRobinStrategy

public abstract class RoutingStrategy extends Object implements AutoCheck
Use this class to implement a specific routing strategy. A routing strategy is a rule which selects an output node from a node list.
Author:
Francesco Radaelli, Bertoli Marco 13-11-2005 (Added job class), Das Ashanka 11-2011 (Added getOutNode with NodeSection).
  • Constructor Details

    • RoutingStrategy

      public RoutingStrategy()
  • Method Details

    • getOutNode

      public abstract NetNode getOutNode(NetNode ownerNode, JobClass jobClass)
      This method should be overridden to implement a specific strategy.
      Parameters:
      ownerNode - Owner node of the output section.
      jobClass - Class of current job to be routed.
      Returns:
      Selected node.
    • getOutNode

      public NetNode getOutNode(NodeSection section, JobClass jobClass)
    • getOutNode

      public NetNode getOutNode(NodeSection section, Job job)
    • check

      public boolean check()
      Description copied from interface: AutoCheck
      Override this method to implement a specific auto-check for the class.
      Specified by:
      check in interface AutoCheck