public class Worker
extends java.lang.Object
Constructor and Description |
---|
Worker(int id)
Create a worker with the id
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(java.lang.String key,
java.lang.Object value) |
int |
getCpu() |
int |
getDisk() |
int |
getId() |
java.lang.Object |
getProperty(java.lang.String key) |
int |
getRam() |
void |
setCpu(int cpu) |
void |
setDisk(int disk) |
void |
setRam(int ram) |
public Worker(int id)
id
- unique id of the workerpublic void addProperty(java.lang.String key, java.lang.Object value)
public java.lang.Object getProperty(java.lang.String key)
public int getId()
public int getCpu()
public int getRam()
public int getDisk()
public void setCpu(int cpu)
public void setRam(int ram)
public void setDisk(int disk)