public class CloudInformationService extends SimEntity
| Constructor and Description |
|---|
CloudInformationService(java.lang.String name)
Allocates a new CloudInformationService object.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Integer> |
getAdvReservList()
Gets the list of CloudResource IDs that only support Advanced Reservation.
|
java.util.List<java.lang.Integer> |
getList()
Gets the list of all CloudResource IDs, including hostList that support Advance Reservation.
|
protected void |
processEndSimulation()
Notifies the registered entities about the end of simulation.
|
void |
processEvent(SimEvent ev)
Processes events scheduled for this entity.
|
protected void |
processOtherEvent(SimEvent ev)
This method needs to override by a child class for processing other events.
|
boolean |
resourceExist(int id)
Checks whether the given CloudResource ID exists or not.
|
boolean |
resourceExist(java.lang.Integer id)
Checks whether the given CloudResource ID exists or not.
|
boolean |
resourceSupportAR(int id)
Checks whether a given resource ID supports Advanced Reservations or not.
|
boolean |
resourceSupportAR(java.lang.Integer id)
Checks whether a given resource ID supports Advanced Reservations or not.
|
void |
shutdownEntity()
Shutdowns the CloudInformationService.
|
protected void |
signalShutdown(java.util.Collection<java.lang.Integer> list)
Sends a signal to all entity IDs mentioned in the given list.
|
void |
startEntity()
Starts the CloudInformationService entity.
|
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 CloudInformationService(java.lang.String name)
throws java.lang.Exception
name - the name to be associated with this entity (as required by SimEntity class)java.lang.Exception - This happens when creating this entity before initialising CloudSim package
or this entity name is null or emptypublic void startEntity()
startEntity in class SimEntitypublic void processEvent(SimEvent ev)
processEvent in class SimEntityev - the event to be handled.SimEntity.processEvent(SimEvent)public void shutdownEntity()
shutdownEntity in class SimEntitypublic java.util.List<java.lang.Integer> getList()
public java.util.List<java.lang.Integer> getAdvReservList()
public boolean resourceSupportAR(java.lang.Integer id)
id - a resource IDpublic boolean resourceSupportAR(int id)
id - a resource IDpublic boolean resourceExist(int id)
id - a CloudResource idpublic boolean resourceExist(java.lang.Integer id)
id - a CloudResource idprotected void processOtherEvent(SimEvent ev)
#body() method.ev - a Sim_event objectprotected void processEndSimulation()
protected void signalShutdown(java.util.Collection<java.lang.Integer> list)
list - List storing entity IDs