Package org.rrd4j.core.jrrd
Class Archive
- java.lang.Object
-
- org.rrd4j.core.jrrd.Archive
-
public class Archive extends Object
Instances of this class model an archive section of an RRD file.- Version:
- $Revision: 1.1 $
- Author:
- Ciaran Treanor
-
-
Field Summary
Fields Modifier and Type Field Description (package private) List<CDPStatusBlock>cdpStatusBlocksConsolitation data points(package private) intcurrentRowRow for last modification time of database(package private) longdataOffsetData offset within file in bytes(package private) RRDatabasedb(package private) longheaderOffsetHeader offset within file in bytes(package private) intpdpCount(package private) introwCountData row count(package private) doublexff
-
Constructor Summary
Constructors Constructor Description Archive(RRDatabase db)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CDPStatusBlockgetCDPStatusBlock(int index)Returns theCDPStatusBlockat the specified position in this archive.Iterator<CDPStatusBlock>getCDPStatusBlocks()Returns an iterator over the CDP status blocks in this archive in proper sequence.intgetPdpCount()Returns the number of primary data points required for a consolidated data point in this archive.intgetRowCount()Returns the number of entries in this archive.ConsolidationFunctionTypegetType()Returns the type of function used to calculate the consolidated data point.double[][]getValues()Getter for the fieldvalues.doublegetXff()Returns the X-Files Factor for this archive.(package private) voidloadCDPStatusBlocks(RRDFile file, int numBlocks)(package private) voidloadCurrentRow(RRDFile file)(package private) voidloadData(DataChunk chunk)(package private) voidloadData(RRDFile file, int dsCount)(package private) voidprintInfo(PrintStream s, NumberFormat numberFormat, int index)StringtoString()Returns a summary the contents of this archive.(package private) voidtoXml(PrintStream s)
-
-
-
Field Detail
-
db
final RRDatabase db
-
headerOffset
final long headerOffset
Header offset within file in bytes
-
dataOffset
long dataOffset
Data offset within file in bytes
-
rowCount
final int rowCount
Data row count
-
pdpCount
final int pdpCount
-
xff
final double xff
-
cdpStatusBlocks
List<CDPStatusBlock> cdpStatusBlocks
Consolitation data points
-
currentRow
int currentRow
Row for last modification time of database
-
-
Constructor Detail
-
Archive
Archive(RRDatabase db) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getType
public ConsolidationFunctionType 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
void loadCDPStatusBlocks(RRDFile file, int numBlocks) throws IOException
- Throws:
IOException
-
getCDPStatusBlock
public CDPStatusBlock getCDPStatusBlock(int index)
Returns theCDPStatusBlockat the specified position in this archive.- Parameters:
index- index ofCDPStatusBlockto return.- Returns:
- the
CDPStatusBlockat the specified position in this archive.
-
getCDPStatusBlocks
public Iterator<CDPStatusBlock> 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:
CDPStatusBlock
-
loadCurrentRow
void loadCurrentRow(RRDFile file) throws IOException
- Throws:
IOException
-
loadData
void loadData(RRDFile file, int dsCount) throws IOException
- Throws:
IOException
-
loadData
void loadData(DataChunk chunk) throws IOException
- Throws:
IOException
-
printInfo
void printInfo(PrintStream s, NumberFormat numberFormat, int index)
-
toXml
void toXml(PrintStream s)
-
getValues
public double[][] getValues() throws IOExceptionGetter for the field
values.- Returns:
- an array of double.
- Throws:
IOException- if any.
-
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.
-
-