public class ArcDef extends Object implements ConsolFuns
For the complete explanation of all archive definition parameters, see RRDTool's rrdcreate man page.
Modifier and Type | Field and Description |
---|---|
static String[] |
CONSOL_FUNS
array of valid consolidation function names
|
CF_AVERAGE, CF_FIRST, CF_LAST, CF_MAX, CF_MIN, CF_TOTAL
Constructor and Description |
---|
ArcDef(String consolFun,
double xff,
int steps,
int rows)
Creates new archive definition object.
|
Modifier and Type | Method and Description |
---|---|
String |
dump()
Returns string representing archive definition (RRDTool format).
|
boolean |
equals(Object obj)
Checks if two archive definitions are equal.
|
(package private) boolean |
exactlyEqual(ArcDef def) |
String |
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.
|
int |
hashCode() |
static boolean |
isValidConsolFun(String consolFun)
Checks if function argument represents valid consolidation function name.
|
(package private) void |
setRows(int rows) |
String |
toString() |
public static final String[] CONSOL_FUNS
public ArcDef(String consolFun, double xff, int steps, int rows) throws RrdException
addArchive()
method of
RrdDb
object.
For the complete explanation of all archive definition parameters, see RRDTool's rrdcreate man page
consolFun
- Consolidation function. Allowed values are "AVERAGE", "MIN",
"MAX" and "LAST" (these string constants are conveniently defined in the
ConsolFuns
class).xff
- X-files factor, between 0 and 1.steps
- Number of archive steps.rows
- Number of archive rows.RrdException
- Thrown if any parameter has illegal value.public String getConsolFun()
public double getXff()
public int getSteps()
public int getRows()
public String dump()
public boolean equals(Object obj)
public static boolean isValidConsolFun(String consolFun)
consolFun
- Consolidation function to be checkedtrue
if consolFun
is valid consolidation function,
false
otherwise.void setRows(int rows)
boolean exactlyEqual(ArcDef def)