public class WorkerNode
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
long |
executionTime |
float |
leftBound |
float |
lowerBound |
float |
rightBound |
float |
upperBound |
Constructor and Description |
---|
WorkerNode(int num) |
Modifier and Type | Method and Description |
---|---|
boolean |
activate()
Set this worker as active.
|
boolean |
deactivate()
Set this worker as inactive.
|
void |
done()
Set this worker as finished in current day.
|
void |
finish()
Set this worker as finished.
|
int |
getWorkerNumber()
Get the worker number.
|
boolean |
isActive()
Check whether this worker is active.
|
boolean |
isDone()
Check whether the worker has finished the simulation of current day.
|
boolean |
isFinished()
Check whether the worker has finished the whole simulation.
|
void |
setBoundaries(float up,
float down,
float left,
float right)
Set the boundaries of the current worker.
|
void |
setExecutionTime(long time)
Set the execution time for the current worker.
|
void |
start()
Start a new day for the current worker.
|
void |
stop()
Finish the current day for the current worker.
|
public float upperBound
public float lowerBound
public float leftBound
public float rightBound
public long executionTime
public int getWorkerNumber()
public boolean isFinished()
public boolean isDone()
public void finish()
public void done()
public boolean activate()
public boolean deactivate()
public void start()
public void stop()
public void setExecutionTime(long time)
time
- public boolean isActive()
public void setBoundaries(float up, float down, float left, float right)
up
- down
- left
- right
-