@Override public String getPath() { return p.getQualifiedName(); }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return getQualifiedName().hashCode(); }
/** * Two probes are equals if qualified names matches * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (obj == null || getClass() != obj.getClass()) { return false; } else { return getQualifiedName().equals(obj); } }
/** * Return the date of the last update of the rrd backend * * @return The date */ public Date getLastUpdate() { Date lastUpdate = null; RrdDb rrdDb = null; try { rrdDb = factory.getRrd(getPath()); lastUpdate = Util.getDate(rrdDb.getLastUpdateTime()); } catch (Exception e) { throw new RuntimeException("Unable to get last update date for " + p.getQualifiedName(), e); } finally { if(rrdDb != null) factory.releaseRrd(rrdDb); } return lastUpdate; }
w.object(); if (p != null) { Optional.ofNullable(p.getQualifiedName()).ifPresent( i -> w.key("probequalifiedname").value(i)); Optional.ofNullable(p.getName()).ifPresent( i-> w.key("probeinstancename").value(i)); Optional.ofNullable(p.getPd().getName()).ifPresent( i-> w.key("probename").value(i));