be.ac.ua.broker.output.textual
Class PriceCalculator

java.lang.Object
  extended by be.ac.ua.broker.output.textual.PriceCalculator

public class PriceCalculator
extends java.lang.Object

This class is used to generate a tree cost overview from a broker result. It creates a cost tree using a PriceDescriptorNode as root node containing PriceDescriptorNodes as children. The overview levels can be of a given order, the possible divisions are: geographical region, operating system, instance type of the instance or the pricing model being used by the instance.

Author:
Vermeersch Kurt

Field Summary
static java.lang.String INSTANCETYPE
          String representing the instance type level option
static java.lang.String OS
          String representing the operating system level option
static java.lang.String PRICINGMODEL
          String representing the pricing model level option
static java.lang.String REGION
          String representing the geographical region level option
 
Constructor Summary
PriceCalculator(SchedulerResultCollection result)
          Constructor for PriceCalculator
 
Method Summary
 PriceDescriptorNode createTree(java.lang.String level1, java.lang.String level2, java.lang.String level3, java.lang.String level4)
          Create a cost overview tree according to the given order of level options
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGION

public static java.lang.String REGION
String representing the geographical region level option


OS

public static java.lang.String OS
String representing the operating system level option


INSTANCETYPE

public static java.lang.String INSTANCETYPE
String representing the instance type level option


PRICINGMODEL

public static java.lang.String PRICINGMODEL
String representing the pricing model level option

Constructor Detail

PriceCalculator

public PriceCalculator(SchedulerResultCollection result)
Constructor for PriceCalculator

Parameters:
result - the schedulerResultCollection obtained by the broker after the allocation phase, for which a cost overview tree has to be generated.
Method Detail

createTree

public PriceDescriptorNode createTree(java.lang.String level1,
                                      java.lang.String level2,
                                      java.lang.String level3,
                                      java.lang.String level4)
Create a cost overview tree according to the given order of level options

Parameters:
level1 - level one option
level2 - level two option
level3 - level three option
level4 - level four option
Returns:
the generated cost overview tree