public class

ArcDef

extends Object
java.lang.Object
   ↳ org.rrd4j.core.ArcDef

Class Overview

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.

For the complete explanation of all archive definition parameters, see RRDTool's rrdcreate man page

Summary

Public Constructors
ArcDef(ConsolFun consolFun, double xff, int steps, int rows)

Creates new archive definition object.

Public Methods
String dump()
Returns string representing archive definition (RRDTool format).
boolean equals(Object obj)
Checks if two archive definitions are equal.
ConsolFun getConsolFun()
Returns consolidation function.
int getRows()
Returns the number of rows (aggregated values) stored in the archive.
int getSteps()
Returns the number of primary RRD steps which complete a single archive step.
double getXff()
Returns the X-files factor.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ArcDef (ConsolFun consolFun, double xff, int steps, int rows)

Creates new archive definition object. This object should be passed as argument to addArchive() method of RrdDb object.

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" and "LAST" (these string constants are conveniently defined in the ConsolFun class).
xff X-files factor, between 0 and 1.
steps Number of archive steps.
rows Number of archive rows.

Public Methods

public String dump ()

Returns string representing archive definition (RRDTool format).

Returns
  • String containing all archive definition parameters.

public boolean equals (Object obj)

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.

Parameters
obj Archive definition to compare with.
Returns
  • true if archive definitions are equal, false otherwise.

public ConsolFun getConsolFun ()

Returns consolidation function.

Returns
  • Consolidation function.

public int getRows ()

Returns the number of rows (aggregated values) stored in the archive.

Returns
  • Number of rows.

public int getSteps ()

Returns the number of primary RRD steps which complete a single archive step.

Returns
  • Number of steps.

public double getXff ()

Returns the X-files factor.

Returns
  • X-files factor value.