Package jline.lang.nodes
Class Router
java.lang.Object
jline.lang.Element
jline.lang.NetworkElement
jline.lang.nodes.Node
jline.lang.nodes.StatefulNode
jline.lang.nodes.Router
- All Implemented Interfaces:
Serializable,Copyable
A node that routes jobs without imposing any delay
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected SchedStrategyTypeprotected SchedStrategyFields inherited from class jline.lang.nodes.Node
dropStrategy, input, model, nodeIndex, output, server, statefulIdx, stationIdx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the scheduling strategy used by this router.getServiceProcess(JobClass jobClass) Gets the service distribution for a specific job class.voidsetSchedPolicy(SchedStrategyType schedPolicy) Sets the scheduling policy type for this router.voidsetService(JobClass jobClass, Distribution distribution) Sets the service distribution for a specific job class.Methods inherited from class jline.lang.nodes.StatefulNode
clearState, getNumberOfServers, getState, getStatefulIndex, getStatePrior, getStateSpace, resetStateSpace, setState, setState, setStatePrior, setStateSpaceMethods inherited from class jline.lang.nodes.Node
getAttribute, getCap, getClassCap, getDropStrategy, getInput, getModel, getNodeIndex, getOutput, getOutputStrategies, getRoutingStrategy, getSections, getServer, getStatefulIdx, getStationIdx, isReferenceStation, isStateful, printSummary, reset, resetRouting, setKChoicesRouting, setModel, setNodeIdx, setProbRouting, setRLRouting, setRouting, setRouting, setStationIdx
-
Field Details
-
cap
protected int cap -
numberOfServers
protected int numberOfServers -
schedPolicy
-
schedStrategy
-
-
Constructor Details
-
Router
Creates a new router node that routes jobs without delay. Uses FCFS scheduling and a single server by default.- Parameters:
model- the network model to add this router toname- the name for this router node
-
-
Method Details
-
getSchedStrategy
Gets the scheduling strategy used by this router.- Returns:
- the scheduling strategy
-
getServiceProcess
Gets the service distribution for a specific job class.- Parameters:
jobClass- the job class to query- Returns:
- the service distribution for the job class
-
setSchedPolicy
Sets the scheduling policy type for this router.- Parameters:
schedPolicy- the scheduling policy type (PR for preemptive, NP for non-preemptive)
-
setService
Sets the service distribution for a specific job class.- Parameters:
jobClass- the job class to configuredistribution- the service distribution to set
-