Class ServiceStrategy

java.lang.Object
NetStrategies.ServiceStrategy
All Implemented Interfaces:
AutoCheck
Direct Known Subclasses:
DisabledServiceTimeStrategy, LoadDependentStrategy, ServiceTimeStrategy, ZeroServiceTimeStrategy

public abstract class ServiceStrategy extends Object implements AutoCheck
Use this class to implement a specific service strategy. A service strategy is a rule which calculates the service time for a job.
Author:
Francesco Radaelli
  • Constructor Details

    • ServiceStrategy

      public ServiceStrategy()
  • Method Details

    • wait

      public abstract double wait(NodeSection nodeSection, JobClass jobClass) throws NetException
      This method should be overridden to implement a specific strategy.
      Parameters:
      nodeSection - the node section which applies this strategy.
      jobClass - the job class which follows this strategy.
      Returns:
      the value of service time.
      Throws:
      NetException
    • expect

      public abstract double expect(NodeSection nodeSection, JobClass jobClass) throws NetException
      This method should be overridden to implement a specific strategy.
      Parameters:
      nodeSection - the node section which applies this strategy.
      jobClass - the job class which follows this strategy.
      Returns:
      the value of service mean.
      Throws:
      NetException
    • 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