java.lang.Object
org.rrd4j.core.jrrd.Archive
Instances of this class model an archive section of an RRD file.
Field Summary
FieldsModifier and TypeFieldDescription(package private) List<CDPStatusBlock> Consolidation data points status blocks.(package private) intRow for last modification time of database.(package private) longData offset within file in bytes.(package private) final RRDatabaseThe parent RRD database.(package private) final longHeader offset within file in bytes.(package private) final intNumber of primary data points per consolidated data point.(package private) final intData row count.(package private) final doubleX-Files factor for this archive.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptiongetCDPStatusBlock(int index) Returns theCDPStatusBlockat the specified position in this archive.Returns an iterator over the CDP status blocks in this archive in proper sequence.intReturns the number of primary data points required for a consolidated data point in this archive.intReturns the number of entries in this archive.getType()Returns the type of function used to calculate the consolidated data point.double[][]Getter for the fieldvalues.doublegetXff()Returns the X-Files Factor for this archive.(package private) voidloadCDPStatusBlocks(RRDFile file, int numBlocks) Loads CDP status blocks from the RRD file.(package private) voidloadCurrentRow(RRDFile file) Loads the current row index from the RRD file.(package private) voidLoads archive data from a data chunk.(package private) voidLoads archive data from the RRD file, skipping to the next archive.(package private) voidprintInfo(PrintStream s, NumberFormat numberFormat, int index) Prints information about this archive to the specified print stream.toString()Returns a summary the contents of this archive.(package private) voidtoXml(PrintStream s) Writes XML representation of this archive to the specified print stream.
Field Details
db
The parent RRD database.headerOffset
final long headerOffsetHeader offset within file in bytes.dataOffset
long dataOffsetData offset within file in bytes.rowCount
final int rowCountData row count.pdpCount
final int pdpCountNumber of primary data points per consolidated data point.xff
final double xffX-Files factor for this archive.cdpStatusBlocks
List<CDPStatusBlock> cdpStatusBlocksConsolidation data points status blocks.currentRow
int currentRowRow for last modification time of database.
Constructor Details
Archive
Method Details
getType
Returns the type of function used to calculate the consolidated data point.- Returns:
- the type of function used to calculate the consolidated data point.
loadCDPStatusBlocks
Loads CDP status blocks from the RRD file.- Parameters:
file- The RRD file to read from.numBlocks- The number of CDP status blocks to load.
getCDPStatusBlock
Returns theCDPStatusBlockat the specified position in this archive.- Parameters:
index- index ofCDPStatusBlockto return.- Returns:
- the
CDPStatusBlockat the specified position in this archive.
getCDPStatusBlocks
Returns an iterator over the CDP status blocks in this archive in proper sequence.- Returns:
- an iterator over the CDP status blocks in this archive in proper sequence.
- See Also:
loadCurrentRow
Loads the current row index from the RRD file.- Parameters:
file- The RRD file to read from.
loadData
Loads archive data from the RRD file, skipping to the next archive.- Parameters:
file- The RRD file to read from.dsCount- Number of data sources in the database.
loadData
Loads archive data from a data chunk.- Parameters:
chunk- The data chunk containing archive data.
printInfo
Prints information about this archive to the specified print stream.- Parameters:
s- Print stream to write to.numberFormat- Number format for displaying values.index- Archive index in the database.
toXml
Writes XML representation of this archive to the specified print stream.- Parameters:
s- Print stream to write to.
getValues
public double[][] getValues()Getter for the fieldvalues.- Returns:
- an array of double.
getPdpCount
public int getPdpCount()Returns the number of primary data points required for a consolidated data point in this archive.- Returns:
- the number of primary data points required for a consolidated data point in this archive.
getRowCount
public int getRowCount()Returns the number of entries in this archive.- Returns:
- the number of entries in this archive.
getXff
public double getXff()Returns the X-Files Factor for this archive.- Returns:
- the X-Files Factor for this archive.
toString