#include <cloudtask.h>
Definition at line 15 of file cloudtask.h.
| CloudTask::CloudTask |
( |
unsigned int |
size, |
|
|
double |
duration, |
|
|
std::vector< Resource * > |
demand, |
|
|
CloudUser * |
clouduser |
|
) |
| |
Definition at line 22 of file cloudtask.cc.
23 ResourceConsumer(size, demand,
true,
false),
id_(0),
scheduled_(
false),
started_(
false),
failed_(
false),
user_(clouduser),
output_(0),
intercom_(0)
27 deadline_ = Scheduler::instance().clock() + duration;
29 for(
unsigned int rd = 0; rd <
res_demands.size();rd++){
31 for(
unsigned int cap = 0; cap <
res_demands.at(rd)->capacity.size();cap++){
std::vector< ResDemand * > res_demands
std::vector< TaskAlloc * > task_allocations_
| CloudTask::~CloudTask |
( |
| ) |
|
|
virtual |
Definition at line 39 of file cloudtask.cc.
41 std::vector <ResDemand*>::iterator iter;
std::vector< ResDemand * > res_demands
Perform failure - related actions. Typically used after failure of one of the task allocations is detected.
Definition at line 59 of file cloudtask.cc.
std::vector< TaskAlloc * > task_allocations_
void releaseAllTaskAllocs()
bool releaseAllocation(ResourceConsumer *rc)
| double CloudTask::getDeadline |
( |
| ) |
|
|
inline |
| double CloudTask::getMIPS |
( |
int |
rd, |
|
|
int |
cap |
|
) |
| |
Definition at line 52 of file cloudtask.cc.
54 std::cerr <<
"MIPS requested for non-Computing resource";
std::vector< ResDemand * > res_demands
| int CloudTask::getOutput |
( |
| ) |
|
|
inline |
| void CloudTask::handler |
( |
Event * |
| ) |
|
|
protected |
| bool CloudTask::isFinished |
( |
| ) |
|
Definition at line 83 of file cloudtask.cc.
84 std::vector <ResDemand*>::iterator u_res;
std::vector< TaskAlloc * > task_allocations_
| void CloudTask::printCompCapacites |
( |
| ) |
|
Definition at line 95 of file cloudtask.cc.
96 std::vector <ResDemand*>::iterator u_res;
97 std::cerr <<
"Capacities: ";
101 std::vector <Capacity>::iterator cap;
102 for(cap=(*u_res)->capacity.begin();cap!=(*u_res)->capacity.end();cap++){
103 std::cerr << (*cap) <<
" ";
std::vector< ResDemand * > res_demands
| void CloudTask::releaseAllTaskAllocs |
( |
| ) |
|
Remove all task allocations from the schedulers.
Definition at line 70 of file cloudtask.cc.
71 std::vector<TaskAlloc*>::iterator iter;
73 if((*iter)->getCoreScheduler()!=NULL){
74 (*iter)->getCoreScheduler()->removeTaskAlloc((*iter));
std::vector< TaskAlloc * > task_allocations_
| void CloudTask::removeTaskAlloc |
( |
TaskAlloc * |
ta | ) |
|
Removes task allocation.
Definition at line 78 of file cloudtask.cc.
std::vector< TaskAlloc * > task_allocations_
| void CloudTask::setDeadline |
( |
double |
deadline | ) |
|
|
inline |
| void CloudTask::setID |
( |
int |
id | ) |
|
|
inline |
| void CloudTask::setIntercom |
( |
int |
intercom | ) |
|
|
inline |
| void CloudTask::setMIPS |
( |
int |
rd, |
|
|
int |
cap, |
|
|
double |
mips |
|
) |
| |
Definition at line 48 of file cloudtask.cc.
std::vector< ResDemand * > res_demands
| void CloudTask::setOutput |
( |
int |
output | ) |
|
|
inline |
| double CloudTask::deadline_ |
amount of data in bytes to be transferred to another data center application.
Definition at line 68 of file cloudtask.h.
amount of data in bytes sent out of the data center upon task completion.
Definition at line 67 of file cloudtask.h.
| bool CloudTask::scheduled_ |
true if task has been scheduled
Definition at line 52 of file cloudtask.h.
true if task has started its execution
Definition at line 53 of file cloudtask.h.
| std::vector<TaskAlloc*> CloudTask::task_allocations_ |
Task allocations are objects that create many-to-many relationship between computational capacities of a task and core schedulers.
Definition at line 60 of file cloudtask.h.
The cloud user that created the task.
Definition at line 65 of file cloudtask.h.
The documentation for this class was generated from the following files: