Put {@link TotalTargetCountActionStatus} for one {@link Rollout}s into
cache.

@param rolloutId
the cache entries belong to
@param status
list to cache
480638
public void putRolloutStatus(final Long rolloutId, final List<TotalTargetCountActionStatus> status) {
        final Cache cache = cacheManager.getCache(CACHE_RO_NAME);
        putIntoCache(rolloutId, status, cache);
    }
98377
private void emitStatusLine(AggregatedResultEvent result, TestStatus status, long timeMillis) throws IOException {
    final StringBuilder line = new StringBuilder();

    line.append(shortTimestamp(result.getStartTimestamp()));
    line.append(Strings.padEnd(statusNames.get(status), 8, ' '));
    line.append(formatDurationInSeconds(timeMillis));
    if (forkedJvmCount > 1) {
      line.append(String.format(Locale.ROOT, jvmIdFormat, result.getSlave().id));
    }
    line.append(" | ");

    line.append(formatDescription(result.getDescription()));
    if (!result.isSuccessful()) {
      line.append(FAILURE_MARKER);
    }
    line.append("\n");

    if (showThrowable) {
      // GH-82 (cause for ignored tests). 
      if (status == TestStatus.IGNORED && result instanceof AggregatedTestResultEvent) {
        final StringWriter sw = new StringWriter();
        PrefixedWriter pos = new PrefixedWriter(indent, sw, DEFAULT_MAX_LINE_WIDTH);
        pos.write("Cause: ");
        pos.write(((AggregatedTestResultEvent) result).getCauseForIgnored());
        pos.completeLine();
        line.append(sw.toString());
      }

      final List<FailureMirror> failures = result.getFailures();
      if (!failures.isEmpty()) {
        final StringWriter sw = new StringWriter();
        PrefixedWriter pos = new PrefixedWriter(indent, sw, DEFAULT_MAX_LINE_WIDTH);
        int count = 0;
        for (FailureMirror fm : failures) {
          count++;
            if (fm.isAssumptionViolation()) {
                pos.write(String.format(Locale.ROOT, 
                    "Assumption #%d: %s",
                    count, MoreObjects.firstNonNull(fm.getMessage(), "(no message)")));
            } else {
                pos.write(String.format(Locale.ROOT, 
                    "Throwable #%d: %s",
                    count,
                    showStackTraces ? filterStackTrace(fm.getTrace()) : fm.getThrowableString()));
            }
        }
        pos.completeLine();
        if (sw.getBuffer().length() > 0) {
          line.append(sw.toString());
        }
      }
    }

    logShort(line);
  }
485988
protected void doCommit(DefaultTransactionStatus status) {

        ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) status
                .getTransaction();

        try {
            super.doCommit(new DefaultTransactionStatus(actualTransactionObject
                    .getDataSourceTransactionObject(), status
                    .isNewTransaction(), status.isNewSynchronization(), status
                    .isReadOnly(), status.isDebug(), status
                    .getSuspendedResources()));
        } catch (TransactionException ex) {
            if (isRollbackOnCommitFailure()) {
                logger.debug("Failed to commit db resource, rethrowing", ex);
                // If we are to rollback on commit failure, just rethrow the
                // exception - this will cause a rollback to be performed on
                // both resources.
                throw ex;
            } else {
                logger
                        .warn("Failed to commit and resource is rollbackOnCommit not set -"
                                + " proceeding to commit ldap resource.");
            }
        }
        ldapManagerDelegate.doCommit(new DefaultTransactionStatus(
                actualTransactionObject.getLdapTransactionObject(), status
                        .isNewTransaction(), status.isNewSynchronization(),
                status.isReadOnly(), status.isDebug(), status
                        .getSuspendedResources()));
    }
734434
protected List<Long> overrideObsoleteUpdateActions(final Collection<Long> targetsIds) {

        // Figure out if there are potential target/action combinations that
        // need to be considered for cancellation
        final List<JpaAction> activeActions = actionRepository
                .findByActiveAndTargetIdInAndActionStatusNotEqualToAndDistributionSetNotRequiredMigrationStep(
                        targetsIds, Action.Status.CANCELING);

        return activeActions.stream().map(action -> {
            action.setStatus(Status.CANCELING);

            // document that the status has been retrieved
            actionStatusRepository.save(new JpaActionStatus(action, Status.CANCELING, System.currentTimeMillis(),
                    RepositoryConstants.SERVER_MESSAGE_PREFIX + "cancel obsolete action due to new update"));
            actionRepository.save(action);

            cancelAssignDistributionSetEvent(action.getTarget(), action.getId());

            return action.getTarget().getId();
        }).collect(Collectors.toList());

    }
819258
public void updateStatus(int statusId, StatusUpdate update) {
		getResourceFactory().getApiResource("/status/" + statusId)
				.entity(update, MediaType.APPLICATION_JSON_TYPE).put();
	}
106573
@Override
    public <T> TaskStatus<T> getStatus(long taskId) {
        String owner = getOwner();
        if (owner == null)
            return null;

        TransactionController tranController = new TransactionController();
        TaskRecord taskRecord = null;
        try {
            tranController.preInvoke();
            taskRecord = taskStore.findById(taskId, owner, false);
        } catch (Throwable x) {
            tranController.setFailure(x);
        } finally {
            PersistentStoreException x = tranController.postInvoke(PersistentStoreException.class); // TODO proposed spec class
            if (x != null)
                throw x;
        }

        return taskRecord == null ? null : new TaskStatusImpl<T>(taskRecord, this);
    }
169847
public void commit(TransactionStatus status) throws TransactionException {

		MultiTransactionStatus multiTransactionStatus = (MultiTransactionStatus) status;

		boolean commit = true;
		Exception commitException = null;
		PlatformTransactionManager commitExceptionTransactionManager = null;

		for (PlatformTransactionManager transactionManager : reverse(transactionManagers)) {

			if (commit) {

				try {
					multiTransactionStatus.commit(transactionManager);
				} catch (Exception ex) {
					commit = false;
					commitException = ex;
					commitExceptionTransactionManager = transactionManager;
				}

			} else {

				// after unsucessfull commit we must try to rollback remaining transaction managers

				try {
					multiTransactionStatus.rollback(transactionManager);
				} catch (Exception ex) {
					LOGGER.warn("Rollback exception (after commit) (" + transactionManager + ") " + ex.getMessage(), ex);
				}
			}
		}

		if (multiTransactionStatus.isNewSynchronization()) {
			synchronizationManager.clearSynchronization();
		}

		if (commitException != null) {
			boolean firstTransactionManagerFailed = commitExceptionTransactionManager == getLastTransactionManager();
			int transactionState = firstTransactionManagerFailed ? HeuristicCompletionException.STATE_ROLLED_BACK
					: HeuristicCompletionException.STATE_MIXED;
			throw new HeuristicCompletionException(transactionState, commitException);
		}
	}
159806
@Override
	public void updateStepStatus(long stepExecutionId, StepStatus stepStatus) {
		logger.entering(CLASSNAME, "updateStepStatus", new Object[] {stepExecutionId, stepStatus});

		if (logger.isLoggable(Level.FINE)) {
			logger.fine("Updating StepStatus to: " + stepStatus.getBatchStatus());
		}
		Connection conn = null;
		PreparedStatement statement = null;
		try {
			conn = getConnection();
			statement = conn.prepareStatement("UPDATE stepstatus SET obj = ? WHERE id = ?");
			statement.setBytes(1, serializeObject(stepStatus));
			statement.setLong(2, stepExecutionId);
			statement.executeUpdate();
		} catch (SQLException e) {
			throw new PersistenceException(e);
		} catch (IOException e) {
			throw new PersistenceException(e);
		} finally {
			cleanupConnection(conn, null, statement);
		}
		logger.exiting(CLASSNAME, "updateStepStatus");
	}
641999
private void setStatus(ConnectionStatus status){
        if(LOGGER.isDebugEnabled()){
            LOGGER.debug("Set status to - " + status);
        }
        if(! this.status.equals(status)){
            ConnectionStatus pre = this.status;
            this.status = status;
            eventThread.queueClientEvent(new ClientStatusEvent(pre, status));
        }
    }
818045
public void setStatusInfos(java.util.Collection<DBInstanceStatusInfo> statusInfos) {
        if (statusInfos == null) {
            this.statusInfos = null;
            return;
        }

        this.statusInfos = new com.amazonaws.internal.SdkInternalList<DBInstanceStatusInfo>(statusInfos);
    }
127912
public void putRolloutStatus(final Map<Long, List<TotalTargetCountActionStatus>> put) {
        final Cache cache = cacheManager.getCache(CACHE_RO_NAME);
        putIntoCache(put, cache);
    }
1276608
protected void setStatusInDB(final boolean _status)
        throws EFapsException
    {
        Connection con = null;
        try {
            con = Context.getConnection();

            PreparedStatement stmt = null;
            final StringBuilder cmd = new StringBuilder();
            try {
                cmd.append(" update T_USERABSTRACT set STATUS=? where ID=").append(getId());
                stmt = con.prepareStatement(cmd.toString());
                stmt.setBoolean(1, _status);
                final int rows = stmt.executeUpdate();
                if (rows == 0) {
                    AbstractUserObject.LOG.error("could not execute '" + cmd.toString()
                            + "' to update status information for person '" + toString() + "'");
                    throw new EFapsException(getClass(), "setStatusInDB.NotUpdated", cmd.toString(), getName());
                }
            } catch (final SQLException e) {
                AbstractUserObject.LOG.error("could not execute '" + cmd.toString()
                        + "' to update status information for person '" + toString() + "'", e);
                throw new EFapsException(getClass(), "setStatusInDB.SQLException", e, cmd.toString(), getName());
            } finally {
                try {
                    if (stmt != null) {
                        stmt.close();
                    }
                    con.commit();
                } catch (final SQLException e) {
                    throw new EFapsException(getClass(), "setStatusInDB.SQLException", e, cmd.toString(), getName());
                }
            }
        } finally {
            try {
                if (con != null && !con.isClosed()) {
                    con.close();
                }
            } catch (final SQLException e) {
                throw new CacheReloadException("Cannot read a type for an attribute.", e);
            }
        }
    }
921909
public void setStatus(String asgName, boolean enabled) {
        String asgAccountId = getASGAccount(asgName);
        asgCache.put(new CacheKey(asgAccountId, asgName), enabled);
    }
1160532
public void populateTotalTargets(final Long totalTargets) {
        if (totalTargets == null) {
            totalTargetsLabel.setVisible(false);
        } else {
            totalTargetsLabel.setVisible(true);
            totalTargetsLabel.setValue(getTotalTargetMessage(totalTargets));
        }
    }
368473
void rollback(long fromTransactionId) {
        long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "rollback", fromTransactionId);
        List<Long> rolledBack = new ArrayList<>();
        while (!this.transactions.isEmpty() && this.transactions.peekLast().getTransactionId() >= fromTransactionId) {
            ContainerMetadataUpdateTransaction txn = this.transactions.removeLast();
            txn.seal();
            rolledBack.add(txn.getTransactionId());
        }

        // At this point, the transaction list is either empty or its last one is sealed; any further changes would
        // require creating a new transaction.
        LoggerHelpers.traceLeave(log, this.traceObjectId, "rollback", traceId, rolledBack);
    }
1352019
private void updateIndexActionStatus(
      IndexAction indexAction, IndexActionMetadata.IndexStatus status) {
    indexAction.setIndexStatus(status);
    dataService.update(INDEX_ACTION, indexAction);
  }
798420
protected void doRollback(DefaultTransactionStatus status) {
        ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) status
                .getTransaction();

        super.doRollback(new DefaultTransactionStatus(actualTransactionObject
                .getDataSourceTransactionObject(), status.isNewTransaction(),
                status.isNewSynchronization(), status.isReadOnly(), status
                        .isDebug(), status.getSuspendedResources()));
        ldapManagerDelegate.doRollback(new DefaultTransactionStatus(
                actualTransactionObject.getLdapTransactionObject(), status
                        .isNewTransaction(), status.isNewSynchronization(),
                status.isReadOnly(), status.isDebug(), status
                        .getSuspendedResources()));
    }