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 Summary
Constructors Constructor Description JobClass(JobClassType type, String name)Creates a new job class with the specified type and name.
-
Method Summary
Modifier and Type Method Description Array<Integer>getAttribute()voidsetAttribute(Array<Integer> attribute)booleangetCompletes()Checks if jobs in this class complete their service and leave the system. voidsetCompletes(boolean completes)intgetIndex()JobClassTypegetJobClassType()Returns the type of this job class. doublegetNumberOfJobs()Returns the number of jobs in this class. intgetPriority()Returns the priority level of this job class. voidsetPriority(int p)Sets the priority level for this job class. StationgetReferenceStation()Returns the reference station for this job class. voidsetReferenceStation(Station ref)Sets the reference station for this job class. booleanisReferenceClass()Checks if this is a reference job class within its chain. voidsetReferenceClass(boolean isrefclass)Sets whether this job class is a reference class within its chain. booleanisReferenceStation(Node node)Checks if the specified node is the reference station for this class. voidprintSummary()Prints a summary of this job class configuration to the console. -
-
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
-
getAttribute
Array<Integer> getAttribute()
-
setAttribute
void setAttribute(Array<Integer> attribute)
-
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
-
setCompletes
void setCompletes(boolean completes)
-
getIndex
int getIndex()
-
getJobClassType
JobClassType getJobClassType()
Returns the type of this job class.
- Returns:
the job class type (OPEN, CLOSED, etc.)
-
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
-
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
-
printSummary
void printSummary()
Prints a summary of this job class configuration to the console.
-
-
-
-