public void copyStateTo(RrdUpdater other) throws IOException { if (!(other instanceof Robin)) { throw new IllegalArgumentException( "Cannot copy Robin object to " + other.getClass().getName()); } Robin robin = (Robin) other; int rowsDiff = rows - robin.getSize(); for (int i = 0; i < robin.getSize(); i++) { int j = i + rowsDiff; robin.store(j >= 0 ? getValue(j) : Double.NaN); } }
/** * Copies object's internal state to another Robin object. * * @param other New Robin object to copy state to * @throws IOException Thrown in case of I/O error */ public void copyStateTo(RrdUpdater other) throws IOException { if (!(other instanceof Robin)) { throw new IllegalArgumentException( "Cannot copy Robin object to " + other.getClass().getName()); } Robin robin = (Robin) other; int rowsDiff = rows - robin.getSize(); for (int i = 0; i < robin.getSize(); i++) { int j = i + rowsDiff; robin.store(j >= 0 ? getValue(j) : Double.NaN); } }
t2 = arc.getEndTime(); long step = arc.getArcStep(); int count = robin.getSize(); timestamps = new long[count]; for (int i = 0; i < count; i++) {