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.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConsolFunHow raw values are consolidated into this archive.private intConsolidated values the archive holds.private final intRaw steps combined into one consolidated value.private final doubleFraction of unknown values still allowed, 0 to 1.Constructor Summary
Method Summary
Public MethodsModifier and TypeMethodDescriptiondump()Returns string representing archive definition (RRDTool format).boolean(package private) booleanexactlyEqual(ArcDef def) Check if two archive definitions are exactly equal.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) Set the number of rows.
Field Details
consolFun
How raw values are consolidated into this archive.xff
private final double xffFraction of unknown values still allowed, 0 to 1.steps
private final int stepsRaw steps combined into one consolidated value.rows
private int rowsConsolidated values the archive holds.
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 the 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:
- the consolidation function for this archive.
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
hashCode
setRows
void setRows(int rows) Set the number of rows.- Parameters:
rows- the number of rows
exactlyEqual
Check if two archive definitions are exactly equal.- Parameters:
def- the definition to compare- Returns:
- true if equal