8 #ifndef RESOURCEPROVIDER_H_ 9 #define RESOURCEPROVIDER_H_ 23 #include "scheduler.h" 55 virtual int command(
int argc,
const char*
const* argv);
63 virtual void print()=0;
113 virtual void handle(Event* event);
144 inline void _sched(
double delay);
double getFreeCapRecursive(res_type type)
std::vector< std::vector< DcResource * > > resource_list
void setTskComAgent(TskComAgent *agnt)
void scheduleNextExent(double nextDeadline)
void setTskComSink(TskComSink *tcs)
void detachSource(ProviderOutAgent *tcp_agent)
virtual ~ResourceProvider()
void sendTaskOutput(CloudTask *task)
double updateResTypeUtil(res_type type)
std::vector< ProviderOutAgent * > vm_migration_sources_
int trySchedulingTsk(CloudTask *tskobj)
virtual void addResource(DcResource *res)
static double useful_bytes
void attachSource(ProviderOutAgent *tcp_agent)
static double uplink_overhead
ProviderOutAgent * poagent_
double getResTypeUtil(res_type type)
TskComAgent * tskComAgent
double getTotalCap(res_type type)
virtual void printTasklist()
double getUsedNet(bool in, bool out)
double getUsedNetRecursive(bool in, bool out)
TskComAgent * getTskComAgent()
void attachSink(VmMigrationSink *vm_mig_sink)
int tryToAllocate(ResourceConsumer *rc)
void recv(ResourceConsumer *rcobj)
std::vector< VmMigrationSink * > vm_migration_sinks_
virtual void handle(Event *event)
double getFreeCap(res_type type)
double resource_utilization[LastResType+1]
void nextEvent(double delay)
bool releaseAllocation(ResourceConsumer *rc)
void setAgent(ProviderOutAgent *agent)
std::vector< ResourceConsumer * > hosted_vms_
void detachSink(VmMigrationSink *vm_mig_sink)
ResourceProvider * getHost()
virtual void updateEnergyAndConsumption()=0
int testSchedulingPossibility(CloudTask *tskobj)
virtual int command(int argc, const char *const *argv)
void _sched(double delay)