Package jline.lang.layered
Class Host
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class Host extends LayeredNetworkElement
A processor that can run Tasks
-
-
Field Summary
Fields Modifier and Type Field Description protected intmultiplicityprotected intreplicationprotected SchedStrategyschedulingprotected doublequantumprotected doublespeedFactorprotected List<Task>taskspublic final static intACTIVITYpublic final static intCALLpublic final static intENTRYpublic final static intHOSTpublic final static intPROCESSORpublic final static intTASKpublic LayeredNetworkmodelprotected Stringname
-
Constructor Summary
Constructors Constructor Description Host(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, double quantum, double speedFactor)Host(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, double quantum)Host(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)Host(LayeredNetwork model, String name, int multiplicity)Host(LayeredNetwork model, String name)
-
Method Summary
Modifier and Type Method Description voidaddTask(Task newTask)booleanremoveTask(Task newTask)voidsetReplication(int replication)List<Task>getTasks()Returns the list of tasks running on this host. intgetMultiplicity()voidsetMultiplicity(int multiplicity)intgetReplication()SchedStrategygetScheduling()voidsetScheduling(SchedStrategy scheduling)doublegetQuantum()voidsetQuantum(double quantum)doublegetSpeedFactor()voidsetSpeedFactor(double speedFactor)-
-
Constructor Detail
-
Host
Host(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, double quantum, double speedFactor)
-
Host
Host(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, double quantum)
-
Host
Host(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)
-
Host
Host(LayeredNetwork model, String name, int multiplicity)
-
Host
Host(LayeredNetwork model, String name)
-
-
Method Detail
-
removeTask
boolean removeTask(Task newTask)
-
setReplication
void setReplication(int replication)
-
getTasks
List<Task> getTasks()
Returns the list of tasks running on this host.
- Returns:
the list of tasks
-
getMultiplicity
int getMultiplicity()
-
setMultiplicity
void setMultiplicity(int multiplicity)
-
getReplication
int getReplication()
-
getScheduling
SchedStrategy getScheduling()
-
setScheduling
void setScheduling(SchedStrategy scheduling)
-
getQuantum
double getQuantum()
-
setQuantum
void setQuantum(double quantum)
-
getSpeedFactor
double getSpeedFactor()
-
setSpeedFactor
void setSpeedFactor(double speedFactor)
-
-
-
-