/** * @return a new <code>Timer</code> instance if the <code>TIMING</code> * logging level is <code>FINE</code>, otherwise, return null; */ public static Timer getInstance() { if (LOGGER.isLoggable(Level.FINE)) { return new Timer(); } return null; }
/** * @return the result of the parse operation (a DOM) * @throws Exception if an error occurs during the parsing process */ public Document call() throws Exception { try { Timer timer = Timer.getInstance(); if (timer != null) { timer.startTiming(); } Document d = getDocument(); if (timer != null) { timer.stopTiming(); timer.logResult("Parse " + documentURL.toExternalForm()); } return d; } catch (Exception e) { throw new ConfigurationException(MessageFormat.format( "Unable to parse document ''{0}'': {1}", documentURL.toExternalForm(), e.getMessage()), e); } }
/** * Log the timing result. * @param taskInfo task description */ public void logResult(String taskInfo) { if (LOGGER.isLoggable(logLevel)) { LOGGER.log(logLevel, " [TIMING] - [" + getTimingResult() + "ms] : " + taskInfo); } }
/** * @return a new <code>Timer</code> instance if the <code>TIMING</code> * logging level is <code>FINE</code>, otherwise, return null; */ public static Timer getInstance() { return getInstance(FINE); }
/** * @return a new <code>Timer</code> instance if the <code>TIMING</code> * logging level is <code>FINE</code>, otherwise, return null; */ public static Timer getInstance() { return getInstance(FINE); }
/** * @return the result of the parse operation (a DOM) * @throws Exception if an error occurs during the parsing process */ public DocumentInfo call() throws Exception { try { Timer timer = Timer.getInstance(); if (timer != null) { timer.startTiming(); } Document d = getDocument(); if (timer != null) { timer.stopTiming(); timer.logResult("Parse " + documentURI.toURL().toExternalForm()); } return new DocumentInfo(d, documentURI); } catch (Exception e) { throw new ConfigurationException(MessageFormat.format( "Unable to parse document ''{0}'': {1}", documentURI.toURL().toExternalForm(), e.getMessage()), e); } }
public static Timer getInstance(Level logLevel) { if (LOGGER.isLoggable(logLevel)) { return new Timer(logLevel); } return null; }
/** * Log the timing result. * @param taskInfo task description */ public void logResult(String taskInfo) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, " [TIMING] - [" + getTimingResult() + "ms] : " + taskInfo); } }
/** * @return a new <code>Timer</code> instance if the <code>TIMING</code> * logging level is <code>FINE</code>, otherwise, return null; */ public static Timer getInstance() { return getInstance(FINE); }
/** * @return the result of the parse operation (a DOM) * @throws Exception * if an error occurs during the parsing process */ @Override public DocumentInfo call() throws Exception { try { Timer timer = Timer.getInstance(); if (timer != null) { timer.startTiming(); } Document document = getDocument(); if (timer != null) { timer.stopTiming(); timer.logResult("Parse " + documentURI.toURL().toExternalForm()); } return new DocumentInfo(document, documentURI); } catch (Exception e) { throw new ConfigurationException( format("Unable to parse document ''{0}'': {1}", documentURI.toURL().toExternalForm(), e.getMessage()), e); } }
public static Timer getInstance(Level logLevel) { if (LOGGER.isLoggable(logLevel)) { return new Timer(logLevel); } return null; }
/** * Log the timing result. * @param taskInfo task description */ public void logResult(String taskInfo) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, " [TIMING] - [" + getTimingResult() + "ms] : " + taskInfo); } }
/** * @return the result of the parse operation (a DOM) * @throws Exception * if an error occurs during the parsing process */ @Override public DocumentInfo call() throws Exception { try { Timer timer = Timer.getInstance(); if (timer != null) { timer.startTiming(); } Document document = getDocument(); if (timer != null) { timer.stopTiming(); timer.logResult("Parse " + documentURI.toURL().toExternalForm()); } return new DocumentInfo(document, documentURI); } catch (Exception e) { throw new ConfigurationException( format("Unable to parse document ''{0}'': {1}", documentURI.toURL().toExternalForm(), e.getMessage()), e); } }
/** * @return a new <code>Timer</code> instance if the <code>TIMING</code> * logging level is <code>FINE</code>, otherwise, return null; */ public static Timer getInstance() { if (LOGGER.isLoggable(Level.FINE)) { return new Timer(); } return null; }
/** * Log the timing result. * @param taskInfo task description */ public void logResult(String taskInfo) { if (LOGGER.isLoggable(logLevel)) { LOGGER.log(logLevel, " [TIMING] - [" + getTimingResult() + "ms] : " + taskInfo); } }
/** * @return the result of the parse operation (a DOM) * @throws Exception * if an error occurs during the parsing process */ @Override public DocumentInfo call() throws Exception { try { Timer timer = Timer.getInstance(); if (timer != null) { timer.startTiming(); } Document document = getDocument(); if (timer != null) { timer.stopTiming(); timer.logResult("Parse " + documentURI.toURL().toExternalForm()); } return new DocumentInfo(document, documentURI); } catch (Exception e) { throw new ConfigurationException( format("Unable to parse document ''{0}'': {1}", documentURI.toURL().toExternalForm(), e.getMessage()), e); } }
public static Timer getInstance(Level logLevel) { if (LOGGER.isLoggable(logLevel)) { return new Timer(logLevel); } return null; }
/** * Log the timing result. * @param taskInfo task description */ public void logResult(String taskInfo) { if (LOGGER.isLoggable(logLevel)) { LOGGER.log(logLevel, " [TIMING] - [" + getTimingResult() + "ms] : " + taskInfo); } }
public Map<Class<? extends Annotation>,Set<Class<?>>> call() throws Exception { Timer t = Timer.getInstance(); if (t != null) { t.startTiming(); t.stopTiming(); t.logResult("Configuration annotation scan complete.");
@Override public Map<Class<? extends Annotation>, Set<Class<?>>> call() throws Exception { Timer t = Timer.getInstance(); if (t != null) { t.startTiming(); t.stopTiming(); t.logResult("Configuration annotation scan complete.");