@Override public void run() { try { long time = System.currentTimeMillis() / 1000; synchronized (statSample) { statSample.setTime(time); statSample.setValues(handler.triples); statSample.update(); } } catch (Exception e) { log.warn("could not update statistics database: {}", e.getMessage()); } } }
@Override public void run() { try { long time = System.currentTimeMillis() / 1000; synchronized (statSample) { statSample.setTime(time); statSample.setValues(handler.triples); statSample.update(); } } catch (Exception e) { log.warn("could not update statistics database: {}", e.getMessage()); } } }
private void updateSample(long now, double val) throws IOException { LOGGER.debug( "Sample time is [{}], updating metric [{}] with value [{}]", MetricsUtil.getCalendarTime(now), mbeanName, val); sample.setTime(now); sample.setValue(rrdDataSourceName, val); sample.update(); }
sample.setTime(t); sample.setValue("sun", sunSource.getValue()); sample.setValue("shade", shadeSource.getValue());