public class WorkflowEngine extends SimEntity
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<? extends Cloudlet> |
jobsList
The job list.
|
protected java.util.List<? extends Cloudlet> |
jobsReceivedList
The job received list.
|
protected int |
jobsSubmitted
The job submitted.
|
protected java.util.List<? extends Cloudlet> |
jobsSubmittedList
The job submitted list.
|
protected java.util.List<? extends Vm> |
vmList |
| Constructor and Description |
|---|
WorkflowEngine(java.lang.String name)
Created a new WorkflowEngine object.
|
WorkflowEngine(java.lang.String name,
int schedulers) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindSchedulerDatacenter(int datacenterId)
Binds a datacenter to the default scheduler (id=0)
|
void |
bindSchedulerDatacenter(int datacenterId,
int schedulerId)
Binds a scheduler with a datacenter.
|
java.util.List<? extends Vm> |
getAllVmList() |
<T extends Cloudlet> |
getJobsList()
Gets the job list.
|
<T extends Cloudlet> |
getJobsReceivedList()
Gets the job received list.
|
<T extends Cloudlet> |
getJobsSubmittedList()
Gets the job submitted list.
|
WorkflowScheduler |
getScheduler(int schedulerId)
Gets the scheduler .
|
int |
getSchedulerId(int index)
Gets the scheduler id list.
|
java.util.List<java.lang.Integer> |
getSchedulerIds()
Gets the scheduler id.
|
java.util.List<WorkflowScheduler> |
getSchedulers()
Gets the schedulers.
|
<T extends Vm> |
getVmList()
Gets the vm list.
|
void |
processEvent(SimEvent ev)
Processes events available for this Broker.
|
protected void |
processJobReturn(SimEvent ev)
Process a job return event.
|
protected void |
processJobSubmit(SimEvent ev)
Process a submit event
|
protected void |
processOtherEvent(SimEvent ev)
Overrides this method when making a new and different type of Broker.
|
protected void |
processResourceCharacteristicsRequest(SimEvent ev)
Process a request for the characteristics of a PowerDatacenter.
|
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. |
void |
submitCloudletList(java.util.List<? extends Cloudlet> list)
This method is used to send to the broker the list of cloudlets.
|
protected void |
submitJobs()
Submit jobs to the created VMs.
|
void |
submitVmList(java.util.List<? extends Vm> list) |
void |
submitVmList(java.util.List<? extends Vm> list,
int schedulerId)
This method is used to send to the broker the list with virtual machines
that must be created.
|
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, waitForEventprotected java.util.List<? extends Cloudlet> jobsList
protected java.util.List<? extends Cloudlet> jobsSubmittedList
protected java.util.List<? extends Cloudlet> jobsReceivedList
protected int jobsSubmitted
protected java.util.List<? extends Vm> vmList
public WorkflowEngine(java.lang.String name)
throws java.lang.Exception
name - name to be associated with this entity (as required by
Sim_entity class from simjava package)java.lang.Exception - the exceptionpublic WorkflowEngine(java.lang.String name,
int schedulers)
throws java.lang.Exception
java.lang.Exceptionpublic void submitVmList(java.util.List<? extends Vm> list, int schedulerId)
list - the listpublic void submitVmList(java.util.List<? extends Vm> list)
public java.util.List<? extends Vm> getAllVmList()
public void submitCloudletList(java.util.List<? extends Cloudlet> list)
list - the listpublic void processEvent(SimEvent ev)
processEvent in class SimEntityev - a SimEvent objectprotected void processResourceCharacteristicsRequest(SimEvent ev)
ev - a SimEvent objectpublic void bindSchedulerDatacenter(int datacenterId,
int schedulerId)
datacenterId - the data center idid - the scheduler idpublic void bindSchedulerDatacenter(int datacenterId)
datacenterId - dataceter Idprotected void processJobSubmit(SimEvent ev)
ev - a SimEvent objectprotected void processJobReturn(SimEvent ev)
ev - a SimEvent objectprotected void processOtherEvent(SimEvent ev)
#body() for incoming unknown tags.ev - a SimEvent objectprotected void submitJobs()
public 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 SimEntitypublic void startEntity()
SimEntitySimulation class when the simulation is started. This
method should be responsible for starting the entity up.startEntity in class SimEntitypublic <T extends Cloudlet> java.util.List<T> getJobsList()
T - the generic typepublic <T extends Cloudlet> java.util.List<T> getJobsSubmittedList()
T - the generic typepublic <T extends Cloudlet> java.util.List<T> getJobsReceivedList()
T - the generic typepublic <T extends Vm> java.util.List<T> getVmList()
T - the generic typepublic java.util.List<WorkflowScheduler> getSchedulers()
T - the generic typepublic java.util.List<java.lang.Integer> getSchedulerIds()
T - the generic typepublic int getSchedulerId(int index)
T - the generic typepublic WorkflowScheduler getScheduler(int schedulerId)
index - the scheduler id