Class Overview
Class to represent archive values for a single datasource. Robin class is the heart of
the so-called "round robin database" concept. Basically, each Robin object is a
fixed length array of double values. Each double value represents consolidated, archived
value for the specific timestamp. When the underlying array of double values gets completely
filled, new values will replace the oldest ones.
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.
Summary
Public Methods |
void
|
bulkStore(double newValue, int bulkCount)
|
void
|
copyStateTo(RrdUpdater other)
Copies object's internal state to another Robin object.
|
String
|
dump()
|
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.
|
double[]
|
getValues(int index, int count)
|
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)
|
void
|
update(double[] newValues)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.rrd4j.core.Robin
abstract
void
|
bulkStore(double newValue, int bulkCount)
|
abstract
void
|
copyStateTo(RrdUpdater other)
Copies object's internal state to another Robin object.
|
abstract
String
|
dump()
|
abstract
void
|
filterValues(double minValue, double maxValue)
Filters values stored in this archive based on the given boundary.
|
abstract
Archive
|
getParent()
Returns the Archive object to which this Robin object belongs.
|
abstract
RrdAllocator
|
getRrdAllocator()
Required to implement RrdUpdater interface.
|
abstract
RrdBackend
|
getRrdBackend()
Returns the underlying storage (backend) object which actually performs all
I/O operations.
|
abstract
int
|
getSize()
Returns the size of the underlying array of archived values.
|
abstract
double
|
getValue(int index)
Returns the i-th value from the Robin archive.
|
abstract
double[]
|
getValues()
Fetches all archived values.
|
abstract
double[]
|
getValues(int index, int count)
|
abstract
void
|
setValue(int index, double value)
Sets the i-th value in the Robin archive.
|
abstract
void
|
setValues(double... newValues)
Updates archived values in bulk.
|
abstract
void
|
setValues(double newValue)
(Re)sets all values in this archive to the same value.
|
abstract
void
|
store(double newValue)
|
abstract
void
|
update(double[] newValues)
|
|
Public Methods
public
void
bulkStore
(double newValue, int bulkCount)
public
void
copyStateTo
(RrdUpdater other)
Copies object's internal state to another Robin object.
Parameters
other
| New Robin object to copy state to |
public
void
filterValues
(double minValue, double maxValue)
Filters values stored in this archive based on the given boundary.
Archived values found to be outside of [minValue, maxValue]
interval (inclusive)
will be silently replaced with NaN
.
Parameters
minValue
| lower boundary |
maxValue
| upper boundary |
public
Archive
getParent
()
Returns the Archive object to which this Robin object belongs.
public
RrdAllocator
getRrdAllocator
()
Required to implement RrdUpdater interface. You should never call this method directly.
public
RrdBackend
getRrdBackend
()
Returns the underlying storage (backend) object which actually performs all
I/O operations.
public
int
getSize
()
Returns the size of the underlying array of archived values.
public
double
getValue
(int index)
Returns the i-th value from the Robin archive.
Returns
- Value stored in the i-th position (the oldest value has zero index)
public
double[]
getValues
()
Fetches all archived values.
Returns
- Array of double archive values, starting from the oldest one.
public
double[]
getValues
(int index, int count)
public
void
setValue
(int index, double value)
Sets the i-th value in the Robin archive.
Parameters
index
| index in the archive (the oldest value has zero index) |
value
| value to be stored |
public
void
setValues
(double... newValues)
Updates archived values in bulk.
Parameters
newValues
| Array of double values to be stored in the archive |
public
void
setValues
(double newValue)
(Re)sets all values in this archive to the same value.
public
void
store
(double newValue)
public
void
update
(double[] newValues)