public class CloudSimShutdown extends SimEntity
| Constructor and Description |
|---|
CloudSimShutdown(java.lang.String name,
int numUser)
Allocates a new CloudSimShutdown object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
processEvent(SimEvent ev)
The main method that shuts down hostList and Cloud Information Service (GIS).
|
void |
shutdownEntity()
This method is invoked by the
Simulation before the simulation finishes. |
void |
startEntity()
This method is invoked by the
Simulation class when the simulation is started. |
cancelEvent, clone, getEventBuffer, getId, getName, getNextEvent, getNextEvent, getState, numEventsWaiting, numEventsWaiting, pause, run, schedule, schedule, schedule, schedule, scheduleFirst, scheduleFirst, scheduleFirst, scheduleFirst, scheduleFirstNow, scheduleFirstNow, scheduleFirstNow, scheduleFirstNow, scheduleNow, scheduleNow, scheduleNow, scheduleNow, selectEvent, send, send, send, send, sendNow, sendNow, sendNow, sendNow, setEventBuffer, setId, setState, waitForEventpublic CloudSimShutdown(java.lang.String name,
int numUser)
throws java.lang.Exception
The total number of grid user entity plays an important role to determine whether all hostList should be shut down or not. If one or more users are still not finish, then the hostList will not be shut down. Therefore, it is important to give a correct number of total grid user entity. Otherwise, CloudSim program will hang or encounter a weird behaviour.
name - the name to be associated with this entity (as required by SimEntity class)numUser - total number of grid user entityjava.lang.Exception - This happens when creating this entity before initialising CloudSim package
or this entity name is null or emptygridsim.CloudSim#init(int, Calendar, boolean)public void processEvent(SimEvent ev)
processEvent in class SimEntityev - the evpublic void startEntity()
SimEntitySimulation class when the simulation is started. This
method should be responsible for starting the entity up.startEntity in class SimEntitypublic void shutdownEntity()
SimEntitySimulation before the simulation finishes. If you want
to save data in log files this is the method in which the corresponding code would be placed.shutdownEntity in class SimEntity