public class RRDatabase
extends java.lang.Object
修飾子とタイプ | フィールド | 説明 |
---|---|---|
(package private) java.util.ArrayList<Archive> |
archives |
|
(package private) java.util.ArrayList<DataSource> |
dataSources |
|
(package private) Header |
header |
|
(package private) java.util.Date |
lastUpdate |
|
(package private) RRDFile |
rrdFile |
コンストラクタ | 説明 |
---|---|
RRDatabase(java.io.File file) |
Creates a database to read from.
|
RRDatabase(java.lang.String name) |
Creates a database to read from.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
close() |
Closes this database stream and releases any associated system resources.
|
Archive |
getArchive(int index) |
Returns the
Archive at the specified position in this database. |
(package private) java.util.ArrayList<Archive> |
getArchiveList(ConsolidationFunctionType type) |
|
java.util.Iterator<Archive> |
getArchives() |
Returns an iterator over the archives in this database in proper sequence.
|
java.util.Iterator<Archive> |
getArchives(ConsolidationFunctionType type) |
Returns an iterator over the archives in this database of the given type
in proper sequence.
|
DataChunk |
getData(ConsolidationFunctionType type) |
Returns data from the database corresponding to the given consolidation
function and a step size of 1.
|
DataChunk |
getData(ConsolidationFunctionType type,
long step) |
Returns data from the database corresponding to the given consolidation
function.
|
DataSource |
getDataSource(int index) |
Returns the
DataSource at the specified position in this database. |
java.util.Iterator<DataSource> |
getDataSources() |
Returns an iterator over the data sources in this database in proper sequence.
|
Header |
getHeader() |
Returns the
Header for this database. |
java.util.Date |
getLastUpdate() |
Returns the date this database was last updated.
|
int |
getNumArchives() |
Returns the number of archives in this database.
|
void |
printInfo(java.io.PrintStream s) |
Outputs the header information of the database to the given print stream
using the default number format.
|
void |
printInfo(java.io.PrintStream s,
java.text.NumberFormat numberFormat) |
Outputs the header information of the database to the given print stream
using the given number format.
|
java.lang.String |
toString() |
Returns a summary the contents of this database.
|
void |
toXml(java.io.PrintStream s) |
Outputs the content of the database to the given print stream
as a stream of XML.
|
RRDFile rrdFile
Header header
java.util.ArrayList<DataSource> dataSources
java.util.ArrayList<Archive> archives
java.util.Date lastUpdate
public RRDatabase(java.lang.String name) throws java.io.IOException, RrdException
name
- the filename of the file to read from.java.io.IOException
- if an I/O error occurs.RrdException
public RRDatabase(java.io.File file) throws java.io.IOException, RrdException
file
- the file to read from.java.io.IOException
- if an I/O error occurs.RrdException
public Header getHeader()
Header
for this database.Header
for this database.public java.util.Date getLastUpdate()
rrdtool last
call Date.getTime() and
divide the result by 1000.public DataSource getDataSource(int index)
DataSource
at the specified position in this database.index
- index of DataSource
to return.DataSource
at the specified position in this databasepublic java.util.Iterator<DataSource> getDataSources()
public Archive getArchive(int index)
Archive
at the specified position in this database.index
- index of Archive
to return.Archive
at the specified position in this database.public java.util.Iterator<Archive> getArchives()
public int getNumArchives()
public java.util.Iterator<Archive> getArchives(ConsolidationFunctionType type)
type
- the consolidation function that should have been applied to
the data.java.util.ArrayList<Archive> getArchiveList(ConsolidationFunctionType type)
public void close() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public void printInfo(java.io.PrintStream s)
double
is 0.0000000000E0.s
- the PrintStream to print the header information to.public DataChunk getData(ConsolidationFunctionType type) throws RrdException, java.io.IOException
type
- the consolidation function that should have been applied to
the data.RrdException
- if there was a problem locating a data archive with
the requested consolidation function.java.io.IOException
- if there was a problem reading data from the database.public DataChunk getData(ConsolidationFunctionType type, long step) throws RrdException, java.io.IOException
type
- the consolidation function that should have been applied to
the data.step
- the step size to use.RrdException
- if there was a problem locating a data archive with
the requested consolidation function.java.io.IOException
- if there was a problem reading data from the database.public void printInfo(java.io.PrintStream s, java.text.NumberFormat numberFormat)
s
- the PrintStream to print the header information to.numberFormat
- the format to print double
s as.public void toXml(java.io.PrintStream s) throws RrdException
s
- the PrintStream to send the XML to.RrdException
public java.lang.String toString()
toString
クラス内 java.lang.Object