Package org.rrd4j.core
Class ArcDef
java.lang.Object
org.rrd4j.core.ArcDef
Class to represent single archive definition within the RRD.
Archive definition consists of the following four elements:
- consolidation function
- X-files factor
- number of steps
- number of rows.
- Author:
- Sasa Markovic
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondump()Returns string representing archive definition (RRDTool format).booleanChecks if two archive definitions are equal.(package private) booleanexactlyEqual(ArcDef def) Returns consolidation function.intgetRows()Returns the number of rows (aggregated values) stored in the archive.intgetSteps()Returns the number of primary RRD steps which complete a single archive step.doublegetXff()Returns the X-files factor.inthashCode()(package private) voidsetRows(int rows)
-
Constructor Details
-
ArcDef
Creates new archive definition object. This object should be passed as argument toaddArchive()method ofRrdDbobject.For the complete explanation of all archive definition parameters, see RRDTool's rrdcreate man page
- Parameters:
consolFun- Consolidation function. Allowed values are "AVERAGE", "MIN", "MAX", "LAST" and "TOTAL" (these string constants are conveniently defined in theConsolFunclass).xff- X-files factor, between 0 and 1.steps- Number of archive steps.rows- Number of archive rows.
-
-
Method Details
-
getConsolFun
Returns consolidation function.- Returns:
- Consolidation function.
-
getXff
public double getXff()Returns the X-files factor.- Returns:
- X-files factor value.
-
getSteps
public int getSteps()Returns the number of primary RRD steps which complete a single archive step.- Returns:
- Number of steps.
-
getRows
public int getRows()Returns the number of rows (aggregated values) stored in the archive.- Returns:
- Number of rows.
-
dump
Returns string representing archive definition (RRDTool format).- Returns:
- String containing all archive definition parameters.
-
equals
Checks if two archive definitions are equal. Archive definitions are considered equal if they have the same number of steps and the same consolidation function. It is not possible to create RRD with two equal archive definitions. -
hashCode
public int hashCode() -
setRows
void setRows(int rows) -
exactlyEqual
-