org.jrobin.core
public class DsDef extends Object implements DsTypes
For the complete explanation of all source definition parameters, see RRDTool's rrdcreate man page.
Field Summary | |
---|---|
static String[] | DS_TYPES
array of valid source types |
Constructor Summary | |
---|---|
DsDef(String dsName, String dsType, long heartbeat, double minValue, double maxValue) Creates new data source definition object. |
Method Summary | |
---|---|
String | dump()
Returns string representing source definition (RRDTool format).
|
boolean | equals(Object obj)
Checks if two datasource definitions are equal.
|
String | getDsName()
Returns data source name.
|
String | getDsType()
Returns source type.
|
long | getHeartbeat()
Returns source heartbeat.
|
double | getMaxValue()
Returns maximal calculated source value.
|
double | getMinValue()
Returns minimal calculated source value.
|
static boolean | isValidDsType(String dsType)
Checks if function argument represents valid source type.
|
Creates new data source definition object. This object should be passed as argument
to addDatasource()
method of RrdDb
object.
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 the
DsTypes class). heartbeat Hearbeat minValue Minimal value. Use Double.NaN
if unknown. maxValue Maximal value. Use Double.NaN
if unknown.
Throws: RrdException Thrown if any parameter has illegal value.
Returns: String containing all data source definition parameters.
Parameters: obj Archive definition to compare with.
Returns: true
if archive definitions are equal,
false
otherwise.
Returns: Data source name.
Returns: Source type ("COUNTER", "GAUGE", "DERIVE" or "ABSOLUTE").
Returns: Source heartbeat.
Returns: Maximal value.
Returns: Minimal value.
Parameters: dsType Source type to be checked.
Returns: true
if dsType
is valid type,
false
otherwise.