public Boolean configure(File rrdpath) {
this.rrdpath = rrdpath;
try {
log(Level.TRACE, "rrd is %s", rrdpath.getCanonicalPath());
} catch (IOException e) {
}
Map<String, String> args = new HashMap<String, String>(1);
try {
args.put("rrdfile", rrdpath.getCanonicalPath());
setMainStore(new RRDToolStoreFactory(), args);
return rrdpath.canRead();
} catch (IOException e) {
log(Level.ERROR, e, "rrdtool file %s unreadable", rrdpath);
return false;
} catch (InvocationTargetException e) {
log(Level.ERROR, e, "store configuration failed");
return false;
}
}