/** * Diagnostics of the application as a whole. * @return snapshot of diagnostics */ @GET @Path(LIVE_DIAGNOSTICS) @Produces({APPLICATION_JSON}) public ApplicationDiagnostics getApplicationDiagnostics() { markGet(SLIDER_SUBPATH_APPLICATION, LIVE_DIAGNOSTICS); try { return state.getApplicationDiagnostics(); } catch (Exception e) { throw buildException(LIVE_CONTAINERS, e); } }
/** * Diagnostics of the application as a whole. * @return snapshot of diagnostics */ @GET @Path(LIVE_DIAGNOSTICS) @Produces({APPLICATION_JSON}) public ApplicationDiagnostics getApplicationDiagnostics() { markGet(SLIDER_SUBPATH_APPLICATION, LIVE_DIAGNOSTICS); try { return state.getApplicationDiagnostics(); } catch (Exception e) { throw buildException(LIVE_CONTAINERS, e); } }
private void checkAndSetContainerAppVersion(String containerId, String appVersion) { StateAccessForProviders amState = getAmState(); try { RoleInstance role = amState.getOwnedContainer(containerId); if (role != null) { String currentAppVersion = role.appVersion; log.debug("Container = {}, app version current = {} new = {}", containerId, currentAppVersion, appVersion); if (currentAppVersion == null || currentAppVersion.equals(APP_VERSION_UNKNOWN)) { amState.getOwnedContainer(containerId).appVersion = appVersion; amState.getApplicationDiagnostics() .getContainer(containerId).appVersion = appVersion; } } } catch (NoSuchNodeException e) { // ignore - there is nothing to do if we don't find a container log.warn("Owned container {} not found - {}", containerId, e); } }
private void checkAndSetContainerAppVersion(String containerId, String appVersion) { StateAccessForProviders amState = getAmState(); try { RoleInstance role = amState.getOwnedContainer(containerId); if (role != null) { String currentAppVersion = role.appVersion; log.debug("Container = {}, app version current = {} new = {}", containerId, currentAppVersion, appVersion); if (currentAppVersion == null || currentAppVersion.equals(APP_VERSION_UNKNOWN)) { amState.getOwnedContainer(containerId).appVersion = appVersion; amState.getApplicationDiagnostics() .getContainer(containerId).appVersion = appVersion; } } } catch (NoSuchNodeException e) { // ignore - there is nothing to do if we don't find a container log.warn("Owned container {} not found - {}", containerId, e); } }
.getApplicationDiagnostics(); List<ContainerInformation> appContainers = new ArrayList<>( appDiagnostics.getContainers());
.getApplicationDiagnostics(); List<ContainerInformation> appContainers = new ArrayList<>( appDiagnostics.getContainers());