|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.ac.ua.broker.input.pricing.EC2SpotPriceWatch
public class EC2SpotPriceWatch
This class provides access to the EC2 spot prices that are inputted through CSV files to the broker
Field Summary | |
---|---|
static java.lang.String |
SPOT_INPUT
Location of the input files containing the spot price history. |
Constructor Summary | |
---|---|
EC2SpotPriceWatch()
Constructor for EC2SpotPriceWatch |
|
EC2SpotPriceWatch(java.lang.String inputLocation)
Constructor for EC2SpotPriceWatch |
Method Summary | |
---|---|
Price |
getPrice(InstanceSpecification inst)
Getter for the price of the given instance using the pricing model associated with the PriceWatch implementation |
SpotPrice |
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()
|
org.apache.commons.math.stat.descriptive.DescriptiveStatistics |
getStatisticsSpotPrice(InstanceSpecification inst,
java.util.Date start,
java.util.Date end)
Getter for the spot price history statistics within the given time frame for the given instance specification |
SpotPrice |
getTippingPointSpotPrice(InstanceSpecification inst,
java.util.Date start,
java.util.Date end,
int index)
Getter for the tipping spot bid price such that all task hours can be run on the cheapest spot price hours, the number of hours that can be skipped is given as well as the instance specification and time frame to determine the spot price tipping point for. |
void |
update()
Update the prices that are returned by the PriceWatch implementation, reread prices from CSV files for example |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String SPOT_INPUT
Constructor Detail |
---|
public EC2SpotPriceWatch()
public EC2SpotPriceWatch(java.lang.String inputLocation)
inputLocation
- the location of the input files containing the spot price
history.Method Detail |
---|
public Price getPrice(InstanceSpecification inst) throws InstanceNotAvailableException
PriceWatch
getPrice
in interface PriceWatch
inst
- the instance specification to get the price for
InstanceNotAvailableException
public void update()
PriceWatch
update
in interface PriceWatch
public java.lang.String getPricingModel()
getPricingModel
in interface PriceWatch
public SpotPrice getPrice(InstanceSpecification inst, java.util.Date timestamp) throws InstanceNotAvailableException
PriceWatch
getPrice
in interface PriceWatch
inst
- the instance specification to get the price fortimestamp
- time to get the price for
InstanceNotAvailableException
public org.apache.commons.math.stat.descriptive.DescriptiveStatistics getStatisticsSpotPrice(InstanceSpecification inst, java.util.Date start, java.util.Date end) throws InstanceNotAvailableException
inst
- the instance specification to get the spot price statistics
forstart
- the start date of the time frame to get the spot price
statistics forend
- the end date of the time frame to get the spot price
statistics for
InstanceNotAvailableException
public SpotPrice getTippingPointSpotPrice(InstanceSpecification inst, java.util.Date start, java.util.Date end, int index) throws InstanceNotAvailableException
inst
- the instance specification to get the bid spot price forstart
- the start date of the time interval to get the bid spot price
forend
- the end date of the time interval to get the bid spot price
forindex
- the number of hours that can be skipped, the spot instance
does not need to be in use
InstanceNotAvailableException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |