|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrobin.core.Datasource
public class Datasource
Class to represent single datasource within RRD. Each datasource object holds the following information: datasource definition (once set, never changed) and datasource state variables (changed whenever RRD gets updated).
Normally, you don't need to manipluate Datasource objects directly, it's up to JRobin framework to do it for you.
| Field Summary |
|---|
| Fields inherited from interface org.jrobin.core.DsTypes |
|---|
DT_ABSOLUTE, DT_COUNTER, DT_DERIVE, DT_GAUGE |
| Method Summary | |
|---|---|
void |
copyStateTo(org.jrobin.core.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. |
org.jrobin.core.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public String getDsName()
throws IOException
IOException - Thrown in case of I/O error
public String getDsType()
throws IOException
IOException - Thrown in case of I/O error
public long getHeartbeat()
throws IOException
IOException - Thrown in case of I/O error
public double getMinValue()
throws IOException
IOException - Thrown in case of I/O error
public double getMaxValue()
throws IOException
IOException - Thrown in case of I/O error
public double getLastValue()
throws IOException
IOException - Thrown in case of I/O error
public double getAccumValue()
throws IOException
IOException - Thrown in case of I/O error
public long getNanSeconds()
throws IOException
IOException - Thrown in case of I/O error
public void copyStateTo(org.jrobin.core.RrdUpdater other)
throws IOException,
RrdException
other - New Datasource object to copy state to
IOException - Thrown in case of I/O error
RrdException - Thrown if supplied argument is not a Datasource object
public int getDsIndex()
throws IOException
IOException - Thrown in case of I/O error
public void setHeartbeat(long heartbeat)
throws RrdException,
IOException
heartbeat - New heartbeat value
IOException - Thrown in case of I/O error
RrdException - Thrown if invalid (non-positive) heartbeat value is specified.
public void setDsName(String newDsName)
throws RrdException,
IOException
newDsName - New datasource name
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
public void setDsType(String newDsType)
throws RrdException,
IOException
RrdException
IOException
public void setMinValue(double minValue,
boolean filterArchivedValues)
throws IOException,
RrdException
filterArchivedValues
argment is set to true, all archived values less then minValue will
be fixed to NaN.
minValue - New minimal value. Specify Double.NaN if no minimal
value should be setfilterArchivedValues - true, if archived datasource values should be fixed;
false, otherwise.
IOException - Thrown in case of I/O error
RrdException - Thrown if invalid minValue was supplied (not less then maxValue)
public void setMaxValue(double maxValue,
boolean filterArchivedValues)
throws IOException,
RrdException
filterArchivedValues
argment is set to true, all archived values greater then maxValue will
be fixed to NaN.
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.
IOException - Thrown in case of I/O error
RrdException - Thrown if invalid maxValue was supplied (not greater then minValue)
public void setMinMaxValue(double minValue,
double maxValue,
boolean filterArchivedValues)
throws IOException,
RrdException
filterArchivedValues
argment is set to true, all archived values less then minValue or
greater then maxValue will be fixed to NaN.
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.
IOException - Thrown in case of I/O error
RrdException - Thrown if invalid min/max values were suppliedpublic RrdBackend getRrdBackend()
public org.jrobin.core.RrdAllocator getRrdAllocator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||