/** * method to log a failure to the log file and to update the last poll status and time * @param msg text for the log message * @param e optional exception encountered or null * @param entry the PollTableEntry */ protected void processFailure(String msg, Exception e, T entry) { if (e == null) { log.error(msg); } else { log.error(msg, e); } long now = System.currentTimeMillis(); entry.setLastPollState(AbstractPollTableEntry.FAILED); entry.setLastPollTime(now); entry.setNextPollTime(now + entry.getPollInterval()); onPollCompletion(entry); }
final long pollInterval = entry.getPollInterval(); TimerTask timerTask = new TimerTask() { @Override if (entry.isConcurrentPollingAllowed()) { timer.scheduleAtFixedRate(timerTask, pollInterval, pollInterval); } else {
return super.loadConfiguration(paramIncl);
protected void onPollCompletion(T entry) { if (!entry.isConcurrentPollingAllowed()) { synchronized (entry) { if (!entry.canceled) { schedulePoll(entry); } } } }
return super.loadConfiguration(paramIncl);
protected void onPollCompletion(T entry) { if (!entry.isConcurrentPollingAllowed()) { synchronized (entry) { if (!entry.canceled) { schedulePoll(entry); } } } }
return super.loadConfiguration(paramIncl);
/** * method to log a failure to the log file and to update the last poll status and time * @param msg text for the log message * @param e optional exception encountered or null * @param entry the PollTableEntry */ protected void processFailure(String msg, Exception e, T entry) { if (e == null) { log.error(msg); } else { log.error(msg, e); } long now = System.currentTimeMillis(); entry.setLastPollState(AbstractPollTableEntry.FAILED); entry.setLastPollTime(now); entry.setNextPollTime(now + entry.getPollInterval()); onPollCompletion(entry); }
final long pollInterval = entry.getPollInterval(); TimerTask timerTask = new TimerTask() { @Override if (entry.isConcurrentPollingAllowed()) { timer.scheduleAtFixedRate(timerTask, pollInterval, pollInterval); } else {
return super.loadConfiguration(params);