public class Archive extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) List<CDPStatusBlock> | cdpStatusBlocksConsolidation data points status blocks. |
(package private) int | currentRowRow for last modification time of database. |
(package private) long | dataOffsetData offset within file in bytes. |
(package private) RRDatabase | dbThe parent RRD database. |
(package private) long | headerOffsetHeader offset within file in bytes. |
(package private) int | pdpCountNumber of primary data points per consolidated data point. |
(package private) int | rowCountData row count. |
(package private) double | xffX-Files factor for this archive. |
| Constructor and Description |
|---|
Archive(RRDatabase db)Create an Archive from an RRD file. |
| Modifier and Type | Method and Description |
|---|---|
CDPStatusBlock | getCDPStatusBlock(int index)Returns the CDPStatusBlock at the specified position in this archive. |
Iterator<CDPStatusBlock> | getCDPStatusBlocks()Returns an iterator over the CDP status blocks in this archive in proper sequence. |
int | getPdpCount()Returns the number of primary data points required for a consolidated data point in this
archive. |
int | getRowCount()Returns the number of entries in this archive. |
ConsolidationFunctionType | getType()Returns the type of function used to calculate the consolidated data point. |
double[][] | getValues()Getter for the field values. |
double | getXff()Returns the X-Files Factor for this archive. |
(package private) void | loadCDPStatusBlocks(RRDFile file,
int numBlocks)Loads CDP status blocks from the RRD file. |
(package private) void | loadCurrentRow(RRDFile file)Loads the current row index from the RRD file. |
(package private) void | loadData(DataChunk chunk)Loads archive data from a data chunk. |
(package private) void | loadData(RRDFile file,
int dsCount)Loads archive data from the RRD file, skipping to the next archive. |
(package private) void | printInfo(PrintStream s,
NumberFormat numberFormat,
int index)Prints information about this archive to the specified print stream. |
String | toString()Returns a summary the contents of this archive. |
(package private) void | toXml(PrintStream s)Writes XML representation of this archive to the specified print stream. |
List<CDPStatusBlock> cdpStatusBlocks
int currentRow
long dataOffset
final RRDatabase db
final long headerOffset
final int pdpCount
final int rowCount
final double xff
Archive(RRDatabase db)
db - the RRD databasepublic CDPStatusBlock getCDPStatusBlock(int index)
CDPStatusBlock at the specified position in this archive.index - index of CDPStatusBlock to return.CDPStatusBlock at the specified position in this archive.public Iterator<CDPStatusBlock> getCDPStatusBlocks()
CDPStatusBlockpublic int getPdpCount()
public int getRowCount()
public ConsolidationFunctionType getType()
public double[][] getValues()
values.public double getXff()
void loadCDPStatusBlocks(RRDFile file, int numBlocks)
file - The RRD file to read from.numBlocks - The number of CDP status blocks to load.void loadCurrentRow(RRDFile file)
file - The RRD file to read from.void loadData(DataChunk chunk)
chunk - The data chunk containing archive data.void loadData(RRDFile file, int dsCount)
file - The RRD file to read from.dsCount - Number of data sources in the database.void printInfo(PrintStream s, NumberFormat numberFormat, int index)
s - Print stream to write to.numberFormat - Number format for displaying values.index - Archive index in the database.public String toString()
void toXml(PrintStream s)
s - Print stream to write to.