/** * Returns Archive object with the given consolidation function and the number * of steps. * * @param consolFun Consolidation function * @param steps Number of archive steps * @return Requested Archive object or null if no such archive could be found * @throws IOException Thrown in case of I/O error */ public Archive getArchive(ConsolFun consolFun, int steps) throws IOException { try { return getArchive(getArcIndex(consolFun, steps)); } catch (IllegalArgumentException e) { return null; } }
/** * Returns Archive object with the given consolidation function and the number * of steps. * * @param consolFun Consolidation function * @param steps Number of archive steps * @return Requested Archive object or null if no such archive could be found * @throws java.io.IOException Thrown in case of I/O error */ public Archive getArchive(ConsolFun consolFun, int steps) throws IOException { try { return getArchive(getArcIndex(consolFun, steps)); } catch (IllegalArgumentException e) { return null; } }
static int getMatchingArchiveIndex(RrdDb rrd1, int arcIndex, RrdDb rrd2) throws IOException { Archive archive = rrd1.getArchive(arcIndex); ConsolFun consolFun = archive.getConsolFun(); int steps = archive.getSteps(); try { return rrd2.getArcIndex(consolFun, steps); } catch (IllegalArgumentException e) { return -1; } }
static int getMatchingArchiveIndex(RrdDb rrd1, int arcIndex, RrdDb rrd2) throws IOException { Archive archive = rrd1.getArchive(arcIndex); ConsolFun consolFun = archive.getConsolFun(); int steps = archive.getSteps(); try { return rrd2.getArcIndex(consolFun, steps); } catch (IllegalArgumentException e) { return -1; } }