|
||||||||||
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.CSVHandler
public class CSVHandler
Class that uses java CSV reader to read in the data from the CSV file downloaded from the cloudexchange.org website
http://sourceforge.net/projects/javacsv/
Field Summary | |
---|---|
protected java.util.List<java.util.List<java.lang.String>> |
fContents
List of list in which the contents of the CSV file are stored |
Constructor Summary | |
---|---|
CSVHandler()
|
Method Summary | |
---|---|
java.lang.Double |
getHighValue(CSVFilterInterface filter,
int index)
Get the spot price value that is the tipping point bid that enables the optimal scheduling of the subtasks |
org.apache.commons.math.stat.descriptive.DescriptiveStatistics |
getStatistics(CSVFilterInterface filter)
Function that generates a list of statistics object using the contents that were found in the input CSV file |
java.lang.String |
getValue(java.lang.String inst,
java.lang.String reg,
java.lang.String os)
Get the price from the CSV file that is stated for the given instance type, geographical region and operating system. |
void |
parse(java.lang.String inputFile)
Parse the given CSV file and store its contents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<java.util.List<java.lang.String>> fContents
Constructor Detail |
---|
public CSVHandler()
Method Detail |
---|
public void parse(java.lang.String inputFile)
inputFile
- the input CSV file to parse and to analyze the content ofpublic java.lang.String getValue(java.lang.String inst, java.lang.String reg, java.lang.String os) throws InstanceNotAvailableException
inst
- the instance type to get the price forreg
- the geographical region to get the price foros
- the operating system to get the price for
InstanceNotAvailableException
public org.apache.commons.math.stat.descriptive.DescriptiveStatistics getStatistics(CSVFilterInterface filter)
filter
- filter that decides whether a certain data item is still part
of the filtered contents
public java.lang.Double getHighValue(CSVFilterInterface filter, int index) throws java.lang.Exception
filter
- the date filter of the time frame in which the spot prices
need to be analyzedindex
- number of hours the spot price does not need to be available
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |