/** * Returns maximal allowed value for this datasource. * * @return Maximal value allowed. * @throws java.io.IOException Thrown in case of I/O error */ public double getMaxValue() throws IOException { return maxValue.get(); }
/** * Returns archive X-files factor. * * @return Archive X-files factor (between 0 and 1). * @throws IOException Thrown in case of I/O error. */ public double getXff() throws IOException { return xff.get(); }
/** * Returns mimimal allowed value for this datasource. * * @return Minimal value allowed. * @throws IOException Thrown in case of I/O error */ public double getMinValue() throws IOException { return minValue.get(); }
/** * Returns maximal allowed value for this datasource. * * @return Maximal value allowed. * @throws IOException Thrown in case of I/O error */ public double getMaxValue() throws IOException { return maxValue.get(); }
/** * Returns last known value of the datasource. * * @return Last datasource value. * @throws IOException Thrown in case of I/O error */ public double getLastValue() throws IOException { return lastValue.get(); }
/** * Returns minimal allowed value for this datasource. * * @return Minimal value allowed. * @throws java.io.IOException Thrown in case of I/O error */ public double getMinValue() throws IOException { return minValue.get(); }
/** * Returns the value accumulated so far. * * @return Accumulated value * @throws java.io.IOException Thrown in case of I/O error */ public double getAccumValue() throws IOException { return accumValue.get(); }
/** * Returns archive X-files factor. * * @return Archive X-files factor (between 0 and 1). * @throws java.io.IOException Thrown in case of I/O error. */ public double getXff() throws IOException { return xff.get(); }
/** * Returns value this datasource accumulated so far. * * @return Accumulated datasource value. * @throws IOException Thrown in case of I/O error */ public double getAccumValue() throws IOException { return accumValue.get(); }
/** * Returns the value accumulated so far. * * @return Accumulated value * @throws IOException Thrown in case of I/O error */ public double getAccumValue() throws IOException { return accumValue.get(); }
/** * Returns last known value of the datasource. * * @return Last datasource value. * @throws java.io.IOException Thrown in case of I/O error */ public double getLastValue() throws IOException { return lastValue.get(); }
/** * Returns value this datasource accumulated so far. * * @return Accumulated datasource value. * @throws java.io.IOException Thrown in case of I/O error */ public double getAccumValue() throws IOException { return accumValue.get(); }
String dump() throws IOException { StringBuilder sb = new StringBuilder("== ARCHIVE ==\n"); sb.append("RRA:").append(consolFun.get()).append(":").append(xff.get()).append(":").append(steps.get()).append(":").append(rows.get()).append("\n"); sb.append("interval [").append(getStartTime()).append(", ").append(getEndTime()).append("]" + "\n"); for (int i = 0; i < robins.length; i++) { sb.append(states[i].dump()); sb.append(robins[i].dump()); } return sb.toString(); }
private void accumulate(long oldTime, long newTime, double updateValue) throws IOException { if (Double.isNaN(updateValue)) { nanSeconds.set(nanSeconds.get() + (newTime - oldTime)); } else { accumValue.set(accumValue.get() + updateValue * (newTime - oldTime)); } }
private void accumulate(long oldTime, long newTime, double updateValue) throws IOException { if (Double.isNaN(updateValue)) { nanSeconds.set(nanSeconds.get() + (newTime - oldTime)); } else { accumValue.set(accumValue.get() + updateValue * (newTime - oldTime)); accumLastValue = updateValue; } }
/** * {@inheritDoc} * * Copies object's internal state to another ArcState object. */ public void copyStateTo(ArcState arcState) throws IOException { arcState.accumValue.set(accumValue.get()); arcState.nanSteps.set(nanSteps.get()); }
void appendXml(XmlWriter writer) throws IOException { writer.startTag("ds"); writer.writeTag("value", accumValue.get()); writer.writeTag("unknown_datapoints", nanSteps.get()); writer.closeTag(); // ds }
void appendXml(XmlWriter writer) throws IOException { writer.startTag("ds"); writer.writeTag("value", accumValue.get()); writer.writeTag("unknown_datapoints", nanSteps.get()); writer.closeTag(); // ds }