void logLapTime(final String message) { logLapTime(message, null); }
void logLapTime(final String message) { logLapTime(message, null); }
void logStats() { if (m_log.isDebugEnabled()) { logLapTime(getStats()); } }
void logStats() { if (m_log.isDebugEnabled()) { logLapTime(getStats()); } }
/** * close the rrd file */ private void processClose(final Object rrd) { if (rrd != null) { try { m_delegate.closeFile(rrd); } catch (final Throwable e) { setErrors(getErrors() + 1); logLapTime("Error closing rrd " + rrd + ": " + e.getMessage()); m_log.debug("Error closing rrd {}: {}", rrd, e.getMessage(), e); } } }
/** * close the rrd file */ private void processClose(final Object rrd) { if (rrd != null) { try { m_delegate.closeFile(rrd); } catch (final Throwable e) { setErrors(getErrors() + 1); logLapTime("Error closing rrd " + rrd + ": " + e.getMessage()); m_log.debug("Error closing rrd {}: {}", rrd, e.getMessage(), e); } } }
@Override public void run() { Object rrd = null; String fileName = null; try { final LinkedList<Operation> ops = getNext(); if (ops == null) { return; } // update stats correctly we update them even if an exception occurs // while we are processing for (final Operation op : ops) { if (op.isSignificant()) { setSignificantOpsCompleted(getSignificantOpsCompleted() + 1); } } // now we actually process the events for (final Operation op : ops) { fileName = op.getFileName(); rrd = op.process(rrd); } } catch (final Throwable e) { setErrors(getErrors() + 1); logLapTime("Error updating file " + fileName + ": " + e.getMessage()); m_log.debug("Error updating file {}: {}", fileName, e.getMessage(), e); } finally { processClose(rrd); } } });
@Override public void run() { Object rrd = null; String fileName = null; try { final LinkedList<Operation> ops = getNext(); if (ops == null) { return; } // update stats correctly we update them even if an exception occurs // while we are processing for (final Operation op : ops) { if (op.isSignificant()) { setSignificantOpsCompleted(getSignificantOpsCompleted() + 1); } } // now we actually process the events for (final Operation op : ops) { fileName = op.getFileName(); rrd = op.process(rrd); } } catch (final Throwable e) { setErrors(getErrors() + 1); logLapTime("Error updating file " + fileName + ": " + e.getMessage()); m_log.debug("Error updating file {}: {}", fileName, e.getMessage(), e); } finally { processClose(rrd); } } });