/** * Returns the last time when some of the archives in this RRD was updated. This time is not the * same as the {@link #getLastUpdateTime()} since RRD file can be updated without updating any of * the archives. * * @return last time when some of the archives in this RRD was updated * @throws java.io.IOException Thrown in case of I/O error */ public long getLastArchiveUpdateTime() throws IOException { long last = 0; for (Archive archive : archives) { last = Math.max(last, archive.getEndTime()); } return last; }
/** * Returns the last time when some of the archives in this RRD was updated. This time is not the * same as the {@link #getLastUpdateTime()} since RRD file can be updated without updating any of * the archives. * * @return last time when some of the archives in this RRD was updated * @throws IOException Thrown in case of I/O error */ public long getLastArchiveUpdateTime() throws IOException { long last = 0; for (Archive archive : archives) { last = Math.max(last, archive.getEndTime()); } return last; }
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(); }
/** * Returns current starting timestamp. This value is not constant. * * @return Timestamp corresponding to the first archive row * @throws java.io.IOException Thrown in case of I/O error. */ public long getStartTime() throws IOException { long endTime = getEndTime(); long arcStep = getArcStep(); long numRows = rows.get(); return endTime - (numRows - 1) * arcStep; }
/** * Returns current starting timestamp. This value is not constant. * * @return Timestamp corresponding to the first archive row * @throws IOException Thrown in case of I/O error. */ public long getStartTime() throws IOException { long endTime = getEndTime(); long arcStep = getArcStep(); long numRows = rows.get(); return endTime - (numRows - 1) * arcStep; }
String dump() throws IOException { StringBuilder sb = new StringBuilder("== ARCHIVE ==\n"); sb.append("RRA:") .append(consolFun.name()) .append(":") .append(xff.get()) .append(":") .append(steps.get()) .append(":") .append(rows.get()) .append("\n") .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(); }
FetchData(Archive matchingArchive, FetchRequest request) throws IOException { this.matchingArchive = matchingArchive; this.arcStep = matchingArchive.getArcStep(); this.arcEndTime = matchingArchive.getEndTime(); this.dsNames = request.getFilter(); if (this.dsNames == null) { this.dsNames = matchingArchive.getParentDb().getDsNames(); } this.request = request; }
FetchData(Archive matchingArchive, FetchRequest request) throws IOException { this.matchingArchive = matchingArchive; this.arcStep = matchingArchive.getArcStep(); this.arcEndTime = matchingArchive.getEndTime(); this.dsNames = request.getFilter(); if (this.dsNames == null) { this.dsNames = matchingArchive.getParentDb().getDsNames(); } this.request = request; }
long arcStep = archive.getArcStep(); long arcStart = archive.getStartTime() - arcStep; long arcEnd = archive.getEndTime(); long fullMatch = fetchEnd - fetchStart; if (arcEnd >= fetchEnd && arcStart <= fetchStart) {
"" + state.getNanSteps(), "" + arc.getStartTime() + " [" + new Date(arc.getStartTime() * 1000L) + "]", "" + arc.getEndTime() + " [" + new Date(arc.getEndTime() * 1000L) + "]" };
long endTime = getEndTime(); String[] dsToFetch = request.getFilter(); if (dsToFetch == null) {
long endTime = getEndTime(); String[] dsToFetch = request.getFilter(); if (dsToFetch == null) {
dsName = ds.getName(); t1 = arc.getStartTime(); t2 = arc.getEndTime(); long step = arc.getArcStep(); int count = robin.getSize();