Class Job

java.lang.Object
QueueNet.Job
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ForkJob

public class Job extends Object implements Cloneable
This class implements a generic job of a queue network.
Author:
Francesco Radaelli, Marco Bertoli
  • Field Details

    • netSystem

      protected NetSystem netSystem
    • systemEnteringTime

      protected double systemEnteringTime
    • globalJobInfoList

      protected GlobalJobInfoList globalJobInfoList
    • lastVisitedPair

      protected org.apache.commons.math3.util.Pair<NetNode,JobClass> lastVisitedPair
  • Constructor Details

    • Job

      public Job(JobClass jobClass, GlobalJobInfoList globalJobInfoList)
      Creates a new instance of Job.
      Parameters:
      jobClass - Reference to the class of the job.
      globalJobInfoList - Reference to the global jobInfoList.
  • Method Details

    • initialize

      public void initialize(NetSystem netSystem)
      Initializes this job.
      Parameters:
      netSystem - the network system
    • getId

      public int getId()
      Gets the ID of this job.
      Returns:
      the ID of this job.
    • getJobClass

      public JobClass getJobClass()
      Gets the class of this job.
      Returns:
      the class of this job.
    • setJobClass

      public void setJobClass(JobClass jobClass)
      Sets the class of this job.
      Parameters:
      jobClass - the class of this job.
    • getNextJobClass

      public JobClass getNextJobClass()
      Gets the next class of this job.
      Returns:
      the next class of this job.
    • setNextJobClass

      public void setNextJobClass(JobClass jobClass)
      Sets the next class of this job.
      Parameters:
      jobClass - the next class of this job.
    • getSystemEnteringTime

      public double getSystemEnteringTime()
      Gets the system entering time of this job.
      Returns:
      the system entering time of this job.
    • setSystemEnteringTime

      public void setSystemEnteringTime(double time)
      Sets the system entering time of this job.
      Parameters:
      time - the system entering time of this job.
    • resetSystemEnteringTime

      public void resetSystemEnteringTime()
      Resets the system entering time of this job.
    • getOriginalDestinationNode

      public NetNode getOriginalDestinationNode()
      Gets the destination node of this redirected job.
      Returns:
      the destination node of this redirected job.
    • setOriginalDestinationNode

      public void setOriginalDestinationNode(NetNode node)
      Sets the destination node of this redirected job.
      Parameters:
      node - the destination node of this redirected job.
    • getServiceTime

      public double getServiceTime()
      Gets the service time of this job.
      Returns:
      the service time of this job.
    • setServiceTime

      public void setServiceTime(double time)
      Sets the service time of this job.
      Parameters:
      time - the service time of this job.
    • getServiceStartTime

      public double getServiceStartTime()
      Gets the service start time of this job.
      Returns:
      the service start time of this job.
    • setServiceStartTime

      public void setServiceStartTime(double time)
      Sets the service start time of this job.
      Parameters:
      time - the service start time of this job.
    • getServingMessage

      public RemoveToken getServingMessage()
      Gets the serving message of this job.
      Returns:
      the serving message of this job.
    • setServingMessage

      public void setServingMessage(RemoveToken message)
      Sets the serving message of this job.
      Parameters:
      message - the serving message of this job.
    • getRemainingServiceTime

      public double getRemainingServiceTime()
      Gets the remaining service time of this job.
      Returns:
      the remaining service time of this job.
    • getRenegingMessage

      public RemoveToken getRenegingMessage()
      Gets the reneging message of this job.
      Returns:
      the reneging message of this job.
    • setRenegingMessage

      public void setRenegingMessage(RemoveToken message)
      Sets the reneging message of this job.
      Parameters:
      message - the reneging message of this job.
    • getLastVisitedPair

      public org.apache.commons.math3.util.Pair<NetNode,JobClass> getLastVisitedPair()
      Gets the last pair visited by this job.
      Returns:
      the last pair visited by this job.
    • setLastVisitedPair

      public void setLastVisitedPair(org.apache.commons.math3.util.Pair<NetNode,JobClass> pair)
      Sets the last pair visited by this job.
      Parameters:
      pair - the last pair visited by this job.
    • AddToVisitPath

      public void AddToVisitPath(org.apache.commons.math3.util.Pair<NetNode,JobClass> pair)
      Adds a pair to the visit path of this job.
      Parameters:
      pair - the pair to be added to the visit path.
    • getTotalQueueTime

      public double getTotalQueueTime()
    • addQueueTime

      public void addQueueTime(double time)
    • setTotalQueueTime

      public void setTotalQueueTime(double time)
    • getNetSystem

      public NetSystem getNetSystem()
    • getCurrentStationSoftDeadline

      public double getCurrentStationSoftDeadline()
    • setCurrentStationSoftDeadline

      public void setCurrentStationSoftDeadline(double currentStationSoftDeadline)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object