class RobinArray extends Object implements Robin
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.
| Constructor and Description |
|---|
RobinArray(Archive parentArc,
int rows,
boolean shouldInitialize) |
| Modifier and Type | Method and Description |
|---|---|
void |
bulkStore(double newValue,
int bulkCount)
bulkStore.
|
void |
copyStateTo(Robin robin)
copyStateTo.
|
String |
dump()
dump.
|
void |
filterValues(double minValue,
double maxValue)
Filters values stored in this archive based on the given boundary.
|
Archive |
getParent()
getParent.
|
RrdAllocator |
getRrdAllocator()
getRrdAllocator.
|
RrdBackend |
getRrdBackend()
getRrdBackend.
|
int |
getSize()
getSize.
|
double |
getValue(int index)
Returns the i-th value from the Robin archive.
|
double[] |
getValues()
Getter for the field
values. |
double[] |
getValues(int index,
int count)
getValues.
|
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.
|
void |
store(double newValue)
store.
|
void |
update(double[] newValues)
update.
|
RobinArray(Archive parentArc, int rows, boolean shouldInitialize) throws IOException
IOExceptionpublic void bulkStore(double newValue,
int bulkCount)
throws IOException
bulkStore in interface RobinnewValue - a double.bulkCount - a int.IOException - if any.public void copyStateTo(Robin robin) throws IOException
Copies object's internal state to another Robin object.
copyStateTo in interface RobincopyStateTo in interface RrdUpdater<Robin>robin - a RrdUpdater object.IOException - if any.public String dump() throws IOException
dump in interface RobinString object.IOException - if any.public void filterValues(double minValue,
double maxValue)
throws IOException
[minValue, maxValue] interval (inclusive) will be silently
replaced with NaN.filterValues in interface RobinminValue - lower boundarymaxValue - upper boundaryIOException - Thrown in case of I/O errorpublic Archive getParent()
public RrdAllocator getRrdAllocator()
getRrdAllocator in interface RobingetRrdAllocator in interface RrdUpdater<Robin>RrdAllocator object.public RrdBackend getRrdBackend()
getRrdBackend in interface RobingetRrdBackend in interface RrdUpdater<Robin>RrdBackend object.public double getValue(int index)
throws IOException
getValue in interface Robinindex - Value indexIOException - Thrown in case of I/O specific error.public double[] getValues()
throws IOException
values.getValues in interface RobinIOException - if any.public double[] getValues(int index,
int count)
throws IOException
getValues in interface Robinindex - a int.count - a int.IOException - if any.public void setValue(int index,
double value)
throws IOException
setValue in interface Robinindex - index in the archive (the oldest value has zero index)value - value to be storedIOException - Thrown in case of I/O specific error.public void setValues(double... newValues)
throws IOException
setValues in interface RobinnewValues - Array of double values to be stored in the archiveIOException - Thrown in case of I/O errorpublic void setValues(double newValue)
throws IOException
setValues in interface RobinnewValue - New valueIOException - Thrown in case of I/O errorpublic void store(double newValue)
throws IOException
store in interface RobinnewValue - a double.IOException - if any.public void update(double[] newValues)
throws IOException
update in interface RobinnewValues - an array of double.IOException - if any.