|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RrdDataSet
Interface to represent a JRobin dataset. A dataset is nothing but a table of datasources, indexed by equidistant timestamps. A dataset allows access to the internal datasources with aggregatoin methods.
Method Summary | |
---|---|
java.lang.String |
exportXml()
Dumps the dataset to XML. |
void |
exportXml(java.io.OutputStream outputStream)
Dumps fetch data to output stream in XML format. |
void |
exportXml(java.lang.String filepath)
Dumps dataset to file in XML format. |
double |
getAggregate(java.lang.String dsName,
java.lang.String consolFun)
Returns aggregated value from the dataset for a single datasource. |
int |
getColumnCount()
Returns the number of columns in this dataset. |
int |
getDsIndex(java.lang.String dsName)
Retrieve the table index number of a datasource by name. |
java.lang.String[] |
getDsNames()
Returns array of the names of all datasources in the set. |
long |
getFirstTimestamp()
Returns the first timestamp in the dataset. |
long |
getLastTimestamp()
Returns the last timestamp in the dataset. |
int |
getRowCount()
Returns the number of rows in this dataset. |
long |
getStep()
Returns the step of these datasources. |
long[] |
getTimestamps()
Returns an array of timestamps covering the whole range specified in the dataset object. |
double[][] |
getValues()
Returns all values for all datasources, the returned values correspond to the timestamps returned with the getTimestamps() method. |
double[] |
getValues(int dsIndex)
Returns all values for a single datasource, the returned values correspond to the timestamps returned with the getTimestamps() method. |
double[] |
getValues(java.lang.String dsName)
Returns all values for a single datasource, the returned values correspond to the timestamps returned with the getTimestamps() method. |
Method Detail |
---|
int getRowCount()
int getColumnCount()
long[] getTimestamps()
double[] getValues(int dsIndex)
getTimestamps()
method.
dsIndex
- Datasource index.
double[][] getValues()
getTimestamps()
method.
double[] getValues(java.lang.String dsName) throws RrdException
getTimestamps()
method.
dsName
- Datasource name.
RrdException
- Thrown if no matching datasource name is found.long getFirstTimestamp()
long getLastTimestamp()
java.lang.String[] getDsNames()
int getDsIndex(java.lang.String dsName) throws RrdException
dsName
- Name of the datasource for which to find the index.
RrdException
- Thrown if the given datasource name cannot be found in the dataset.long getStep()
double getAggregate(java.lang.String dsName, java.lang.String consolFun) throws RrdException
dsName
- Datasource nameconsolFun
- Consolidation function to be applied to set datasource values datasource.
Valid consolidation functions are MIN, MAX, LAST and AVERAGE
RrdException
- Thrown if the given datasource name cannot be found in the dataset.void exportXml(java.io.OutputStream outputStream) throws RrdException, java.io.IOException
outputStream
- Output stream to dump dataset to
RrdException
- Thrown in case of JRobin specific error.
java.io.IOException
- Thrown in case of I/O errorvoid exportXml(java.lang.String filepath) throws RrdException, java.io.IOException
filepath
- Path to destination file
RrdException
- Thrown in case of JRobin specific error.
java.io.IOException
- Thrown in case of I/O errorjava.lang.String exportXml() throws RrdException, java.io.IOException
RrdException
- Thrown in case of JRobin specific error.
java.io.IOException
- Thrown in case of an I/O related error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |