public Robin(Archive parentArc, int rows, bool shouldInitialize) { this.parentArc = parentArc; this.pointer = new RrdInt(this); this.values = new RrdDoubleArray(this, rows); this.rows = rows; if (shouldInitialize) { pointer.set(0); values.set(0, Double.NaN, rows); } }
// stores single value public void store(double newValue) { int position = pointer.get(); values.set(position, newValue); pointer.set((position + 1) % rows); }