org.jrobin.core
public class Datasource extends Object implements RrdUpdater, DsTypes
Normally, you don't need to manipluate Datasource objects directly, it's up to JRobin framework to do it for you.
Method Summary | |
---|---|
void | copyStateTo(RrdUpdater other)
Copies object's internal state to another Datasource object.
|
double | getAccumValue()
Returns value this datasource accumulated so far.
|
int | getDsIndex()
Returns index of this Datasource object in the RRD.
|
String | getDsName()
Returns datasource name.
|
String | getDsType()
Returns datasource type (GAUGE, COUNTER, DERIVE, ABSOLUTE).
|
long | getHeartbeat()
Returns datasource heartbeat
|
double | getLastValue()
Returns last known value of the datasource.
|
double | getMaxValue()
Returns maximal allowed value for this datasource.
|
double | getMinValue()
Returns mimimal allowed value for this datasource.
|
long | getNanSeconds()
Returns the number of accumulated NaN seconds.
|
RrdAllocator | getRrdAllocator()
Required to implement RrdUpdater interface. |
RrdBackend | getRrdBackend()
Returns the underlying storage (backend) object which actually performs all
I/O operations.
|
void | setDsName(String newDsName)
Sets datasource name to a new value
|
void | setDsType(String newDsType) |
void | setHeartbeat(long heartbeat)
Sets datasource heartbeat to a new value.
|
void | setMaxValue(double maxValue, boolean filterArchivedValues)
Sets maximum allowed value for this datasource. |
void | setMinMaxValue(double minValue, double maxValue, boolean filterArchivedValues)
Sets min/max values allowed for this datasource. |
void | setMinValue(double minValue, boolean filterArchivedValues)
Sets minimum allowed value for this datasource. |
Parameters: other New Datasource object to copy state to
Throws: IOException Thrown in case of I/O error RrdException Thrown if supplied argument is not a Datasource object
Returns: Accumulated datasource value.
Throws: IOException Thrown in case of I/O error
Returns: Datasource index in the RRD.
Throws: IOException Thrown in case of I/O error
Returns: Datasource name
Throws: IOException Thrown in case of I/O error
Returns: Datasource type.
Throws: IOException Thrown in case of I/O error
Returns: Datasource heartbeat
Throws: IOException Thrown in case of I/O error
Returns: Last datasource value.
Throws: IOException Thrown in case of I/O error
Returns: Maximal value allowed.
Throws: IOException Thrown in case of I/O error
Returns: Minimal value allowed.
Throws: IOException Thrown in case of I/O error
Returns: Accumulated NaN seconds.
Throws: IOException Thrown in case of I/O error
Returns: Allocator object
Returns: I/O backend object
Parameters: newDsName New datasource name
Throws: RrdException Thrown if invalid data source name is specified (name too long, or name already defined in the RRD IOException Thrown in case of I/O error
Parameters: heartbeat New heartbeat value
Throws: IOException Thrown in case of I/O error RrdException Thrown if invalid (non-positive) heartbeat value is specified.
filterArchivedValues
argment is set to true, all archived values greater then maxValue
will
be fixed to NaN.
Parameters: maxValue New maximal value. Specify Double.NaN
if no max
value should be set. filterArchivedValues true, if archived datasource values should be fixed;
false, otherwise.
Throws: IOException Thrown in case of I/O error RrdException Thrown if invalid maxValue was supplied (not greater then minValue)
filterArchivedValues
argment is set to true, all archived values less then minValue
or
greater then maxValue
will be fixed to NaN.
Parameters: minValue New minimal value. Specify Double.NaN
if no min
value should be set. maxValue New maximal value. Specify Double.NaN
if no max
value should be set. filterArchivedValues true, if archived datasource values should be fixed;
false, otherwise.
Throws: IOException Thrown in case of I/O error RrdException Thrown if invalid min/max values were supplied
filterArchivedValues
argment is set to true, all archived values less then minValue
will
be fixed to NaN.
Parameters: minValue New minimal value. Specify Double.NaN
if no minimal
value should be set filterArchivedValues true, if archived datasource values should be fixed;
false, otherwise.
Throws: IOException Thrown in case of I/O error RrdException Thrown if invalid minValue was supplied (not less then maxValue)