org.jrobin.core
public class Robin extends Object implements RrdUpdater
Robin object does not hold values in memory - such object could be quite large. Instead of it, Robin reads them from the backend I/O only when necessary.
Method Summary | |
---|---|
void | copyStateTo(RrdUpdater other)
Copies object's internal state to another Robin object.
|
void | filterValues(double minValue, double maxValue)
Filters values stored in this archive based on the given boundary.
|
Archive | getParent()
Returns the Archive object to which this Robin object belongs.
|
RrdAllocator | getRrdAllocator()
Required to implement RrdUpdater interface. |
RrdBackend | getRrdBackend()
Returns the underlying storage (backend) object which actually performs all
I/O operations.
|
int | getSize()
Returns the size of the underlying array of archived values.
|
double | getValue(int index)
Returns the i-th value from the Robin archive.
|
double[] | getValues()
Fetches all archived values.
|
void | setValue(int index, double value)
Sets the i-th value in the Robin archive.
|
void | setValues(double[] newValues)
Updates archived values in bulk.
|
void | setValues(double newValue)
(Re)sets all values in this archive to the same value.
|
Parameters: other New Robin object to copy state to
Throws: IOException Thrown in case of I/O error RrdException Thrown if supplied argument is not a Robin object
[minValue, maxValue]
interval (inclusive)
will be silently replaced with NaN
.
Parameters: minValue lower boundary maxValue upper boundary
Throws: IOException Thrown in case of I/O error
Returns: Parent Archive object
Returns: Allocator object
Returns: I/O backend object
Returns: Number of stored values
Parameters: index Value index
Returns: Value stored in the i-th position (the oldest value has zero index)
Throws: IOException Thrown in case of I/O specific error.
Returns: Array of double archive values, starting from the oldest one.
Throws: IOException Thrown in case of I/O specific error.
Parameters: index index in the archive (the oldest value has zero index) value value to be stored
Throws: IOException Thrown in case of I/O specific error.
Parameters: newValues Array of double values to be stored in the archive
Throws: IOException Thrown in case of I/O error RrdException Thrown if the length of the input array is different from the length of this archive
Parameters: newValue New value
Throws: IOException Thrown in case of I/O error