be.ac.ua.broker.scheduling.region
Class RegionWorkloadCollection

java.lang.Object
  extended by be.ac.ua.broker.scheduling.region.RegionWorkloadCollection

public class RegionWorkloadCollection
extends java.lang.Object

This class is used to represent the workload that is appointed to a certain geographical region by the RegionAllocator. It's possible the task was task was already appointed to the region by the user of the broker, but it's also possible that the RegionAllocator determined the region to be expected to be the cheapest one to run the workload in.

Author:
Vermeersch Kurt

Constructor Summary
RegionWorkloadCollection(java.lang.String reg)
          Constructor for RegionWorkloadCollection
 
Method Summary
 void add(InstanceSpecification spec, Workload workload)
          Add a workload that is associated with the region of this RegionWorkloadCollection, that is associated with a provided instance specification
 java.lang.String getRegion()
           
 void print()
          Print functionality for the regionWorkloadCollection
 java.util.List<SchedulerResult> schedule(boolean wm1, java.lang.String version)
          Schedule the workloads of this collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegionWorkloadCollection

public RegionWorkloadCollection(java.lang.String reg)
Constructor for RegionWorkloadCollection

Parameters:
reg - the geographical region the workload is associated with
Method Detail

add

public void add(InstanceSpecification spec,
                Workload workload)
Add a workload that is associated with the region of this RegionWorkloadCollection, that is associated with a provided instance specification

Parameters:
spec - the instance specification of the instance the provided workload has to run on
workload - the workload

getRegion

public java.lang.String getRegion()
Returns:
the geographical region this workload collection is associated with

schedule

public java.util.List<SchedulerResult> schedule(boolean wm1,
                                                java.lang.String version)
                                         throws InvalidInputException
Schedule the workloads of this collection

Parameters:
wm1 - whether workload model one is being used
version - the scheduling option that is begin used
Returns:
the generated list of schedulerResults
Throws:
InvalidInputException - exception thrown when an invalid scheduling option is provided

print

public void print()
Print functionality for the regionWorkloadCollection