Class ClosedSignal
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class ClosedSignal extends ClosedClass implements Serializable
A closed signal class for modeling signals in closed queueing networks.
ClosedSignal is a specialized ClosedClass for signals that need to circulate in closed networks. Unlike regular Signal (which extends OpenClass), ClosedSignal can be used in networks without Source/Sink nodes.
ClosedSignal has zero population - signals are created dynamically through class switching from the target job class.
Signal types:
- NEGATIVE: Removes a job from the destination queue
- REPLY: Unblocks servers waiting for a reply (LQN synchronous call semantics)
-
-
Field Summary
Fields Modifier and Type Field Description public SignalTypesignalTypepublic JobClasstargetJobClassprotected doublepopulationprotected Networkmodelprotected JobClassTypetypeprotected intpriorityprotected booleancompletesprotected Stationrefstatprotected booleanisrefclassprotected intindexprotected doubledeadlinepublic Array<Integer>attributepublic intreplySignalClassIndexpublic Distributionpatiencepublic PatienceTypepatienceTypeprotected Stringname
-
Constructor Summary
Constructors Constructor Description ClosedSignal(Network model, String name, SignalType signalType, Station refstat, int priority)Creates a new closed signal class with the specified type, reference station, and priority. ClosedSignal(Network model, String name, SignalType signalType, Station refstat)Creates a new closed signal class with the specified type, reference station, and default priority (0). ClosedSignal(Network model, String name, Station refstat)Creates a new negative closed signal class with default priority (0).
-
Method Summary
Modifier and Type Method Description SignalTypegetSignalType()Gets the signal type for this signal class. voidsetSignalType(SignalType signalType)Sets the signal type for this signal class. JobClassgetTargetJobClass()Gets the associated job class. ClosedSignalforJobClass(JobClass jobClass)Associates this signal with a job class. intgetTargetJobClassIndex()Gets the index of the associated job class. voidprintSummary()Prints a summary of this closed signal class configuration. -
Methods inherited from class jline.lang.JobClass
expectsReply, getAttribute, getCompletes, getDeadline, getIndex, getJobClassType, getPatience, getPatienceType, getPriority, getReplySignalClassIndex, hasPatience, isReferenceClass, isReferenceStation, setAttribute, setCompletes, setDeadline, setPatience, setPatience, setPriority, setReferenceClass, setReferenceStation, setReplySignalClassIndex -
Methods inherited from class jline.lang.ClosedClass
getNumberOfJobs, getPopulation, getReferenceStation, setPopulation -
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
-
ClosedSignal
ClosedSignal(Network model, String name, SignalType signalType, Station refstat, int priority)
Creates a new closed signal class with the specified type, reference station, and priority.- Parameters:
model- the network model to add this class toname- the name for this signal classsignalType- the type of signal (NEGATIVE or REPLY)refstat- the reference station (should match target job class)priority- the priority level for signals in this class
-
ClosedSignal
ClosedSignal(Network model, String name, SignalType signalType, Station refstat)
Creates a new closed signal class with the specified type, reference station, and default priority (0).- Parameters:
model- the network model to add this class toname- the name for this signal classsignalType- the type of signal (NEGATIVE or REPLY)refstat- the reference station (should match target job class)
-
-
Method Detail
-
getSignalType
SignalType getSignalType()
Gets the signal type for this signal class.
- Returns:
the signal type
-
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
ClosedSignal 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 ClosedSignal 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 closed signal class configuration.
-
-
-
-