Package jline.lang

Class JobClass

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    
    public class JobClass
    extends NetworkElement implements Serializable
                        

    Superclass representing a class of jobs

    • Constructor Detail

      • JobClass

        JobClass(JobClassType type, String name)
        Creates a new job class with the specified type and name.
        Parameters:
        type - the type of job class (OPEN, CLOSED, etc.
        name - the name for this job class
    • Method Detail

      • getReplySignalClassIndex

         int getReplySignalClassIndex()

        Gets the index of the reply signal class.

        Returns:

        the index of the reply signal class, or -1 if no reply is expected

      • setReplySignalClassIndex

         void setReplySignalClassIndex(int signalClassIndex)

        Sets the reply signal class index for synchronous call semantics. When a job of this class completes service, the server will block until receiving a REPLY signal from the signal class at the specified index.

        Parameters:
        signalClassIndex - the index of the signal class that will unblock the server
      • getPatience

         Distribution getPatience()

        Gets the global patience distribution for this job class.

        Returns:

        the patience distribution, or null if not set

      • setPatience

         void setPatience(Distribution distribution)

        Sets the global patience distribution for this job class. This applies to all queues unless overridden by a queue-specific patience setting. Defaults to RENEGING patience type for backwards compatibility.

        Parameters:
        distribution - the patience time distribution
      • getPatienceType

         PatienceType getPatienceType()

        Gets the global patience type for this job class.

        Returns:

        the patience type, or null if not set

      • getCompletes

         boolean getCompletes()

        Checks if jobs in this class complete their service and leave the system.

        Returns:

        true if jobs complete, false if they remain in the system

      • getNumberOfJobs

         double getNumberOfJobs()

        Returns the number of jobs in this class. Default implementation returns infinite (for open classes).

        Returns:

        number of jobs in this class

      • getPriority

         int getPriority()

        Returns the priority level of this job class. Higher values indicate higher priority.

        Returns:

        the priority level

      • setPriority

         void setPriority(int p)

        Sets the priority level for this job class.

        Parameters:
        p - the priority level to set
      • getDeadline

         double getDeadline()

        Returns the relative deadline for jobs in this class. The deadline is specified as time units from job arrival. A value of Double.POSITIVE_INFINITY indicates no deadline constraint.

        Returns:

        the relative deadline in time units, or Double.POSITIVE_INFINITY if no deadline

      • setDeadline

         void setDeadline(double deadline)

        Sets the relative deadline for jobs in this class. Jobs will be assigned an absolute deadline of arrivalTime + deadline when they enter queues with EDD/EDF scheduling.

        Parameters:
        deadline - the relative deadline in time units (must be >0), or Double.
      • getReferenceStation

         Station getReferenceStation()

        Returns the reference station for this job class. The reference station is used for normalization in closed networks.

        Returns:

        the reference station, or null if not set

      • setReferenceStation

         void setReferenceStation(Station ref)

        Sets the reference station for this job class.

        Parameters:
        ref - the station to use as reference
      • isReferenceClass

         boolean isReferenceClass()

        Checks if this is a reference job class within its chain.

        Returns:

        true if this is a reference class

      • setReferenceClass

         void setReferenceClass(boolean isrefclass)

        Sets whether this job class is a reference class within its chain.

        Parameters:
        isrefclass - true to make this a reference class
      • isReferenceStation

         boolean isReferenceStation(Node node)

        Checks if the specified node is the reference station for this class.

        Parameters:
        node - the node to check
        Returns:

        true if the node is the reference station

      • expectsReply

         boolean expectsReply()

        Checks if this job class expects a reply signal after processing.

        Returns:

        true if a reply signal is expected, false otherwise

      • setPatience

         void setPatience(PatienceType patienceType, Distribution distribution)

        Sets the global patience type and distribution for this job class. This applies to all queues unless overridden by a queue-specific patience setting.

        Parameters:
        patienceType - the type of impatience (RENEGING or BALKING)
        distribution - the patience time distribution
      • hasPatience

         boolean hasPatience()

        Checks if this job class has a patience distribution configured.

        Returns:

        true if patience is configured, false otherwise

      • printSummary

         void printSummary()

        Prints a summary of this job class configuration to the console.