private Set<String> getFeedbackChannelNames() { try { return getFeedbackHandler().getChannelNames(); } catch (IOException e) { // Probably a serious problem due to local IO related to feedback. No cause to abort the sync so we just log // it as an error. logError("Exception while looking up feedback channel names."); } return Collections.emptySet(); }
private FeedbackChannel getFeedbackChannel(String name) { try { return getFeedbackHandler().getChannel(name); } catch (IOException e) { // Probably a serious problem due to local IO related to feedback. No cause to abort the sync so we just log // it as an error. logError("Exception while looking up feedback channel %s", e, name); } return null; }
/** * Should be called to notify that an installation is ended, successfully or unsuccessfully. * * @param updateInfo * the information about the update; * @param cause * the (optional) cause why the installation failed. */ protected final void installationFailed(UpdateInfo updateInfo, Throwable cause) { getController().logError("Installation of %s update failed: %s!", cause, updateInfo.m_type, cause.getMessage()); m_lastVersionSuccessful = false; m_failureCount++; m_controller.sendDeploymentCompletedEvent(updateInfo, false /* success */, cause); }
private void runAgentUpdate() throws RetryAfterException, InterruptedException { if (isInterrupted()) { throw new InterruptedException("Controller was interrupted, not running agent updates check..."); } logDebug("Checking for agent updates..."); long maxRetries = m_maxRetries.get(); boolean fixPackage = m_fixPackage.get(); UpdateInstaller updateInstaller = getUpdateInstaller(); try { updateInstaller.installUpdate(getAgentUpdateHandler(), fixPackage, maxRetries); } catch (IOException e) { logError("Agent update aborted due to Exception.", e); } }
private void runDeploymentUpdate() throws RetryAfterException, InterruptedException { if (isInterrupted()) { throw new InterruptedException("Controller was interrupted, not running deployment updates check..."); } logDebug("Checking for deployment updates..."); long maxRetries = m_maxRetries.get(); boolean fixPackage = m_fixPackage.get(); UpdateInstaller updateInstaller = getUpdateInstaller(); try { updateInstaller.installUpdate(getDeploymentHandler(), fixPackage, maxRetries); } catch (IOException e) { logError("Deployment update aborted due to Exception.", e); } }
/** * Should be called to notify that an installation is ended, successfully or unsuccessfully. * * @param updateInfo * the information about the update; * @param exception * the (optional) cause why the installation failed. */ protected final void installationFailed(UpdateInfo updateInfo, InstallationFailedException exception) { // InstallationFailedException is a catch-all wrapper exception, so use its cause directly... getController().logError("Installation of %s update failed: %s!", exception.getCause(), updateInfo.m_type, exception.getReason()); m_lastVersionSuccessful = false; m_failureCount++; m_controller.sendDeploymentCompletedEvent(updateInfo, false /* success */, exception.getCause()); }