Package org.jrobin.core.jrrd
Class Archive
- java.lang.Object
-
- org.jrobin.core.jrrd.Archive
-
public class Archive extends Object
Instances of this class model an archive section of an RRD file.- Version:
- $Revision$
- Author:
- Ciaran Treanor
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ArrayList<CDPStatusBlock>
cdpStatusBlocks
(package private) int
currentRow
(package private) long
dataOffset
(package private) RRDatabase
db
(package private) long
offset
(package private) int
pdpCount
(package private) int
rowCount
(package private) long
size
(package private) ConsolidationFunctionType
type
(package private) double
xff
-
Constructor Summary
Constructors Constructor Description Archive(RRDatabase db)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CDPStatusBlock
getCDPStatusBlock(int index)
Returns theCDPStatusBlock
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()
double
getXff()
Returns the X-Files Factor for this archive.(package private) void
loadCDPStatusBlocks(RRDFile file, int numBlocks)
(package private) void
loadCurrentRow(RRDFile file)
(package private) DataChunk
loadData(DataChunk chunk)
(package private) void
loadData(DataChunk chunk, long startTime, long endTime)
(package private) void
loadData(RRDFile file, int dsCount)
(package private) void
printInfo(PrintStream s, NumberFormat numberFormat, int index)
String
toString()
Returns a summary the contents of this archive.(package private) void
toXml(PrintStream s)
-
-
-
Field Detail
-
db
RRDatabase db
-
offset
long offset
-
dataOffset
long dataOffset
-
size
long size
-
type
ConsolidationFunctionType type
-
rowCount
int rowCount
-
pdpCount
int pdpCount
-
xff
double xff
-
cdpStatusBlocks
ArrayList<CDPStatusBlock> cdpStatusBlocks
-
currentRow
int currentRow
-
-
Constructor Detail
-
Archive
Archive(RRDatabase db) throws IOException, RrdException
- Throws:
IOException
RrdException
-
-
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, RrdException
- Throws:
IOException
RrdException
-
getCDPStatusBlock
public CDPStatusBlock getCDPStatusBlock(int index)
Returns theCDPStatusBlock
at the specified position in this archive.- Parameters:
index
- index ofCDPStatusBlock
to return.- Returns:
- the
CDPStatusBlock
at 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, RrdException
- Throws:
IOException
RrdException
-
loadData
void loadData(RRDFile file, int dsCount) throws IOException
- Throws:
IOException
-
loadData
DataChunk loadData(DataChunk chunk) throws IOException, RrdException
- Throws:
IOException
RrdException
-
loadData
void loadData(DataChunk chunk, long startTime, long endTime) throws IOException, RrdException
- Throws:
IOException
RrdException
-
printInfo
void printInfo(PrintStream s, NumberFormat numberFormat, int index)
-
toXml
void toXml(PrintStream s) throws RrdException
- Throws:
RrdException
-
getValues
public double[][] getValues() throws IOException, RrdException
- Throws:
IOException
RrdException
-
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.
-
-