Class PollingServer

Direct Known Subclasses:
ExhaustivePollingServer, GatedPollingServer, LimitedPollingServer

public class PollingServer extends ServiceSection
This class implements a polling server. Every class has a specific distribution and a own set of statistical parameters. Every class has walk over (switchover) period
Author:
Ahmed Salem
  • Constructor Details

    • PollingServer

      public PollingServer(Integer numberOfServers, Integer[] numberOfVisitsPerClass, ServiceStrategy[] serviceStrategies, ServiceStrategy[] switchOverStrategies)
    • PollingServer

      public PollingServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, ServiceStrategy[] switchOverStrategies, Integer[] serverNumRequired, String[] serverNames, Integer[] serversPerServerType, Object[] serverCompatibilities, String schedulingPolicy)
      Creates a new instance of PollingServer.
      Parameters:
      numberOfServers - Number of jobs which can be served simultaneously.
      numberOfVisits - Number of job visits per class (not used).
      serviceStrategies - Array of service strategies, one per class.
      switchOverStrategies - Array of switchover strategies, one per class
  • Method Details

    • getDoubleSectionProperty

      public double getDoubleSectionProperty(int id) throws NetException
      Description copied from class: NodeSection
      Gets a double type property of this node. Note that the first 256 identifiers are reserved by NodeSection class.
      Overrides:
      getDoubleSectionProperty in class NodeSection
      Parameters:
      id - Property identifier (see properties constants).
      Returns:
      Property value.
      Throws:
      NetException - if the requested property is not available.
    • getDoubleSectionProperty

      public double getDoubleSectionProperty(int id, JobClass jobClass) throws NetException
      Description copied from class: NodeSection
      Gets a double type property of this node depending on a specified job class. Note that the first 256 identifiers are reserved by NodeSection class.
      Overrides:
      getDoubleSectionProperty in class NodeSection
      Parameters:
      id - Property identifier (see properties constants).
      jobClass - jobClass.
      Returns:
      Property value.
      Throws:
      NetException - if the requested property is not available.
    • nodeLinked

      protected void nodeLinked(NetNode node) throws NetException
      Description copied from class: NodeSection
      This method should be overridden to implement a specific behaviour of the node section when the node section itself is linked to the owner node. This method should be used to set node section properties depending on the owner node ones.
      Overrides:
      nodeLinked in class NodeSection
      Parameters:
      node - Owner node.
      Throws:
      NetException
    • process

      protected int process(NetMessage message) throws NetException
      Description copied from class: NodeSection
      This method should be overridden to implement a specific NetMessage processor.
      Specified by:
      process in class NodeSection
      Parameters:
      message - message to be processed.
      Returns:
      message processing result.
      Throws:
      NetException
    • getServiceStrategies

      public ServiceStrategy[] getServiceStrategies()
      Gets the service strategy for each class.
      Returns:
      the service strategy for each class.