be.ac.ua.broker.input.pricing
Interface PriceWatch

All Known Implementing Classes:
EC2OnDemandPriceWatch, EC2ReservedPriceWatch, EC2SpotPriceWatch

public interface PriceWatch

This interface represents an access point to the prices of EC2 for a particular pricing model

Author:
Vermeersch Kurt

Method Summary
 Price getPrice(InstanceSpecification inst)
          Getter for the price of the given instance using the pricing model associated with the PriceWatch implementation
 Price getPrice(InstanceSpecification inst, java.util.Date timestamp)
          Getter for the price of the given instance at a certain moment in time using the pricing model associated with the PriceWatch implementation
 java.lang.String getPricingModel()
           
 void update()
          Update the prices that are returned by the PriceWatch implementation, reread prices from CSV files for example
 

Method Detail

update

void update()
Update the prices that are returned by the PriceWatch implementation, reread prices from CSV files for example


getPricingModel

java.lang.String getPricingModel()
Returns:
name of the pricing model this access point was created for

getPrice

Price getPrice(InstanceSpecification inst)
               throws InstanceNotAvailableException
Getter for the price of the given instance using the pricing model associated with the PriceWatch implementation

Parameters:
inst - the instance specification to get the price for
Returns:
the price for the given instance
Throws:
InstanceNotAvailableException

getPrice

Price getPrice(InstanceSpecification inst,
               java.util.Date timestamp)
               throws InstanceNotAvailableException
Getter for the price of the given instance at a certain moment in time using the pricing model associated with the PriceWatch implementation

Parameters:
inst - the instance specification to get the price for
timestamp - time to get the price for
Returns:
the price for the given instance at the given moment in time
Throws:
InstanceNotAvailableException