java.lang.Object
org.rrd4j.core.jrrd.Header
- All Implemented Interfaces:
Constants
Field Summary
FieldsModifier and TypeFieldDescription(package private) final intNumber of data sourcesprivate static final doubleValue marking a file written with floats.private final intthe database version as integerprivate static final longStart of the header within the buffer.(package private) final intPrimary data point step(package private) final intNumber of archives within fileprivate final longSize of the header in bytes.(package private) final Stringthe database version stringFields inherited from interface Constants
CF_NAM_SIZE, COOKIE, DS_NAM_SIZE, DST_SIZE, LAST_DS_LEN, MAX_SUPPORTED_VERSION, SIZE_OF_DOUBLE, UNDEFINED_VERSION, UNDEFINED_VERSION_AS_INT, VERSION_WITH_LAST_UPDATE_SECModifier and TypeFieldDescriptionstatic final intConstantCF_NAM_SIZE=20static final StringConstantCOOKIE="RRD"static final intConstantDS_NAM_SIZE=20static final intConstantDST_SIZE=20static final intConstantLAST_DS_LEN=30static final intConstantMAX_SUPPORTED_VERSION=3static final intConstantSIZE_OF_DOUBLE=8static final StringConstantUNDEFINED_VERSION="UNDEF"static final intConstantUNDEFINED_VERSION_AS_INT=-1static final intConstantVERSION_WITH_LAST_UPDATE_SEC=3Constructor Summary
Method Summary
All MethodsModifier and TypeMethodDescriptionintReturns the number ofDataSources in the database.intReturns the primary data point interval in seconds.intReturns the number ofArchives in the database.Returns the version of the database.intReturns the version of the database as an integer.toString()Returns a summary the contents of this header.
Field Details
FLOAT_COOKIE
private static final double FLOAT_COOKIEValue marking a file written with floats.- See Also:
offset
private static final long offsetStart of the header within the buffer.- See Also:
size
private final long sizeSize of the header in bytes.version
the database version stringiVersion
private final int iVersionthe database version as integerdsCount
final int dsCountNumber of data sourcesrraCount
final int rraCountNumber of archives within filepdpStep
final int pdpStepPrimary data point step
Constructor Details
Header
Header(RRDFile file) throws IOException Constructs a Header from the RRD file.- Parameters:
file- the RRD file to read from- Throws:
IOException- if the RRD file cannot be read
Method Details
getVersion
getVersionAsInt
public int getVersionAsInt()Returns the version of the database as an integer.- Returns:
- the version of the database.
getDSCount
public int getDSCount()Returns the number ofDataSources in the database.- Returns:
- the number of
DataSources in the database.
getRRACount
public int getRRACount()Returns the number ofArchives in the database.- Returns:
- the number of
Archives in the database.
getPDPStep
public int getPDPStep()Returns the primary data point interval in seconds.- Returns:
- the primary data point interval in seconds.
toString