/** * Returns primary RRD time step. * * @return Primary time step in seconds * @throws java.io.IOException Thrown in case of I/O error */ public long getStep() throws IOException { return step.get(); }
/** * Returns the last update time of the RRD. * * @return Timestamp (Unix epoch, no milliseconds) corresponding to the last update time. * @throws java.io.IOException Thrown in case of I/O error */ public long getLastUpdateTime() throws IOException { return lastUpdateTime.get(); }
/** * Returns the number of accumulated NaN seconds. * * @return Accumulated NaN seconds. * @throws java.io.IOException Thrown in case of I/O error */ public long getNanSeconds() throws IOException { return nanSeconds.get(); }
/** * Returns datasource heartbeat * * @return Datasource heartbeat * @throws IOException Thrown in case of I/O error */ public long getHeartbeat() throws IOException { return heartbeat.get(); }
/** * Returns the number of accumulated NaN seconds. * * @return Accumulated NaN seconds. * @throws IOException Thrown in case of I/O error */ public long getNanSeconds() throws IOException { return nanSeconds.get(); }
/** * Returns the number of currently accumulated NaN steps. * * @return Number of currently accumulated NaN steps. * @throws IOException Thrown in case of I/O error */ public long getNanSteps() throws IOException { return nanSteps.get(); }
/** * Returns datasource heartbeat * * @return Datasource heartbeat * @throws java.io.IOException Thrown in case of I/O error */ public long getHeartbeat() throws IOException { return heartbeat.get(); }
/** * Returns the number of currently accumulated NaN steps. * * @return Number of currently accumulated NaN steps. * @throws java.io.IOException Thrown in case of I/O error */ public long getNanSteps() throws IOException { return nanSteps.get(); }
private double calculateLastTotal(long startTime, long boundaryTime) throws IOException { double totalValue = Double.NaN; long validSeconds = boundaryTime - startTime - nanSeconds.get(); if (nanSeconds.get() <= heartbeat.get() && validSeconds > 0) { totalValue = accumLastValue; } if (Double.isNaN(totalValue) && dsName.get().endsWith(DsDef.FORCE_ZEROS_FOR_NANS_SUFFIX)) { totalValue = 0D; } return totalValue; }
/** * {@inheritDoc} * * Copies object's internal state to another Header object. */ public void copyStateTo(Header header) throws IOException { header.lastUpdateTime.set(lastUpdateTime.get()); }
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; } }
void appendXml(XmlWriter writer) throws IOException { writer.writeComment(signature.get()); writer.writeTag("version", RRDTOOL_VERSION3); writer.writeComment("Seconds"); writer.writeTag("step", step.get()); writer.writeComment(Util.getDate(lastUpdateTime.get())); writer.writeTag("lastupdate", lastUpdateTime.get()); }
void appendXml(XmlWriter writer) throws IOException { writer.writeComment(signature.get()); writer.writeTag("version", RRDTOOL_VERSION); writer.writeComment("Seconds"); writer.writeTag("step", step.get()); writer.writeComment(Util.getDate(lastUpdateTime.get())); writer.writeTag("lastupdate", lastUpdateTime.get()); }
/** * {@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 }
void appendXml(XmlWriter writer) throws IOException { writer.startTag("ds"); writer.writeTag("name", dsName.get()); writer.writeTag("type", dsType.name()); writer.writeTag("minimal_heartbeat", heartbeat.get()); writer.writeTag("min", minValue.get()); writer.writeTag("max", maxValue.get()); writer.writeComment("PDP Status"); writer.writeTag("last_ds", lastValue.get(), "UNKN"); writer.writeTag("value", accumValue.get()); writer.writeTag("unknown_sec", nanSeconds.get()); writer.closeTag(); // ds }