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); } }
RoleInstance instance; try { instance = getAmState().getOwnedContainer(containerId); } catch (NoSuchNodeException e) { log.warn("Failed to locate instance of container {}", containerId, e);
RoleInstance instance; try { instance = getAmState().getOwnedContainer(containerId); } catch (NoSuchNodeException e) { log.warn("Failed to locate instance of container {}", containerId, e);
RoleInstance role = null; if(status.getIp() != null && !status.getIp().isEmpty()){ role = amState.getOwnedContainer(containerId); role.ip = status.getIp(); role = amState.getOwnedContainer(containerId); role.hostname = status.getHostname();
RoleInstance role = null; if(status.getIp() != null && !status.getIp().isEmpty()){ role = amState.getOwnedContainer(containerId); role.ip = status.getIp(); role = amState.getOwnedContainer(containerId); role.hostname = status.getHostname();