Package jline.lang

Class Signal

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

    
    public class Signal
    extends OpenClass implements Serializable
                        

    A signal class representing special customers in G-networks and related models.

    Signals are specialized open classes that can have special effects on queues they visit. Unlike regular customers that simply receive service, signals can:

    • Remove jobs from destination queues (NEGATIVE signals)
    • Reset queue states (RESET signals)
    • Trigger reply actions (REPLY signals)

    G-networks (Gelenbe networks) use negative signals to model scenarios like job cancellations or service interrupts.

    Reference: Gelenbe, E. (1991). "Product-form queueing networks with negative and positive customers", Journal of Applied Probability

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Signal(Network model, String name, SignalType signalType, int priority) Creates a new signal class with the specified type and priority.
      Signal(Network model, String name, SignalType signalType) Creates a new signal class with the specified type and default priority (0).
      Signal(Network model, String name) Creates a new negative signal class with default priority (0).
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      SignalType getSignalType() Gets the signal type for this signal class.
      void setSignalType(SignalType signalType) Sets the signal type for this signal class.
      JobClass getTargetJobClass() Gets the associated job class.
      Signal forJobClass(JobClass jobClass) Associates this signal with a job class.
      int getTargetJobClassIndex() Gets the index of the associated job class.
      void printSummary() Prints a summary of this signal class configuration.
      • Methods inherited from class jline.lang.JobClass

        expectsReply, getAttribute, getCompletes, getDeadline, getIndex, getJobClassType, getNumberOfJobs, getPatience, getPatienceType, getPriority, getReferenceStation, getReplySignalClassIndex, hasPatience, isReferenceClass, isReferenceStation, setAttribute, setCompletes, setDeadline, setPatience, setPatience, setPriority, setReferenceClass, setReferenceStation, setReplySignalClassIndex
      • Methods inherited from class jline.lang.OpenClass

        setReferenceStation
      • Methods inherited from class jline.lang.Element

        getName, setName
      • Methods inherited from class jline.lang.Copyable

        copy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Signal

        Signal(Network model, String name, SignalType signalType, int priority)
        Creates a new signal class with the specified type and priority.
        Parameters:
        model - the network model to add this class to
        name - the name for this signal class
        signalType - the type of signal (NEGATIVE, RESET, or REPLY)
        priority - the priority level for signals in this class
      • Signal

        Signal(Network model, String name, SignalType signalType)
        Creates a new signal class with the specified type and default priority (0).
        Parameters:
        model - the network model to add this class to
        name - the name for this signal class
        signalType - the type of signal (NEGATIVE, RESET, or REPLY)
      • Signal

        Signal(Network model, String name)
        Creates a new negative signal class with default priority (0).
        Parameters:
        model - the network model to add this class to
        name - the name for this signal class
    • Method Detail

      • setSignalType

         void setSignalType(SignalType signalType)

        Sets the signal type for this signal class.

        Parameters:
        signalType - the new signal type
      • getTargetJobClass

         JobClass getTargetJobClass()

        Gets the associated job class.

        Returns:

        the JobClass associated with this signal, or null if none

      • forJobClass

         Signal forJobClass(JobClass jobClass)

        Associates this signal with a job class.

        For REPLY signals, this specifies which job class's servers will be unblocked when this signal arrives.

        Parameters:
        jobClass - the JobClass to associate with this signal
        Returns:

        this Signal instance (for method chaining)

      • getTargetJobClassIndex

         int getTargetJobClassIndex()

        Gets the index of the associated job class.

        Returns:

        the index of the associated JobClass, or -1 if none

      • printSummary

         void printSummary()

        Prints a summary of this signal class configuration.