Package org.rrd4j.core
Class DsDef
java.lang.Object
org.rrd4j.core.DsDef
Class to represent single data source definition within the RRD. Datasource definition consists of the following five elements:
- data source name
- data source type
- heartbeat
- minimal value
- maximal value
For the complete explanation of all source definition parameters, see RRDTool's rrdcreate man page.
- Author:
- Sasa Markovic
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondump()Returns string representing source definition (RRDTool format).booleanChecks if two datasource definitions are equal.(package private) booleanexactlyEqual(DsDef def) Returns data source name.Returns source type.longReturns source heartbeat.doubleReturns maximal calculated source value.doubleReturns minimal calculated source value.inthashCode()
-
Field Details
-
FORCE_ZEROS_FOR_NANS_SUFFIX
- See Also:
-
-
Constructor Details
-
DsDef
Creates new data source definition object. This object should be passed as argument toaddDatasource()method ofRrdDbobject.For the complete explanation of all source definition parameters, see RRDTool's rrdcreate man page
IMPORTANT NOTE: If datasource name ends with '!', corresponding archives will never store NaNs as datasource values. In that case, NaN datasource values will be silently replaced with zeros by the framework.
- Parameters:
dsName- Data source name.dsType- Data source type. Valid values are "COUNTER", "GAUGE", "DERIVE" and "ABSOLUTE" (these string constants are conveniently defined in theDsTypeclass).heartbeat- HearbeatminValue- Minimal value. UseDouble.NaNif unknown.maxValue- Maximal value. UseDouble.NaNif unknown.
-
-
Method Details
-
getDsName
Returns data source name.- Returns:
- Data source name.
-
getDsType
Returns source type.- Returns:
- Source type ("COUNTER", "GAUGE", "DERIVE" or "ABSOLUTE").
-
getHeartbeat
public long getHeartbeat()Returns source heartbeat.- Returns:
- Source heartbeat.
-
getMinValue
public double getMinValue()Returns minimal calculated source value.- Returns:
- Minimal value.
-
getMaxValue
public double getMaxValue()Returns maximal calculated source value.- Returns:
- Maximal value.
-
dump
Returns string representing source definition (RRDTool format).- Returns:
- String containing all data source definition parameters.
-
equals
Checks if two datasource definitions are equal. Source definitions are treated as equal if they have the same source name. It is not possible to create RRD with two equal archive definitions. -
hashCode
public int hashCode() -
exactlyEqual
-