/*
(non-Javadoc)

@see org.springframework.batch.core.StepExecutionListener#afterStep(org.
springframework.batch.core.StepExecution)
501752
@Override
    public ExitStatus afterStep(final StepExecution stepExecution) {
        if (getErrors().size() == 0) {
            List<String> verifyErrors = verifySpace(verifier);
            for (String error : verifyErrors) {
                addError(error);
            }
        }

        ExitStatus status = stepExecution.getExitStatus();
        List<String> errors = getErrors();
        if (errors.size() > 0) {
            status = status.and(ExitStatus.FAILED);

            for (String error : errors) {
                status = status.addExitDescription(error);
            }

            failExecution();

            log.error("space verification step finished: step_execution_id={} "
                      + "job_execution_id={}  spaceId={} status=\"{}\"",
                      stepExecution.getId(),
                      stepExecution.getJobExecutionId(),
                      spaceId,
                      status);
        } else {

            status = status.and(ExitStatus.COMPLETED);
            log.info("space verification step finished: step_execution_id={} "
                     + "job_execution_id={}  spaceId={} exit_status={} ",
                     stepExecution.getId(),
                     stepExecution.getJobExecutionId(),
                     spaceId,
                     status);
        }

        return status;
    }
5961
public void stepSucceeded(StepSucceededMessage stepSuccessMessage) {
        ExecutingStep s = executingStep.get();
        if ( ! s.getExecutionUUID().equals(stepSuccessMessage.getExecutionId())) {
            //This could happen if chorus interpreter timed out the previous step while waiting for the reply
            //Hence log to debug rather than error
            log.debug("Received a StepSucceededMessage for a step execution id " + stepSuccessMessage.getExecutionId() + " which did not match the currently executing step " + s.getExecutionUUID());
        } else {
            s.getCompletableFuture().complete(stepSuccessMessage);
        }
    }
788667
public void fire(StepFinishedEvent event) {
        Step step = stepStorage.adopt();
        event.process(step);

        notifier.fire(event);
    }
197342
public void execute() {

    while (!steps.isEmpty()) {
      currentStep = steps.remove(0);

      try {
        LOG.debugPerformOperationStep(currentStep.getName());

        currentStep.performOperationStep(this);
        successfulSteps.add(currentStep);

        LOG.debugSuccessfullyPerformedOperationStep(currentStep.getName());
      }
      catch (Exception e) {

        if(isRollbackOnFailure) {

          try {
            rollbackOperation();
          }
          catch(Exception e2) {
            LOG.exceptionWhileRollingBackOperation(e2);
          }
          // re-throw the original exception
          throw LOG.exceptionWhilePerformingOperationStep(name, currentStep.getName(), e);
        }

        else {
          LOG.exceptionWhilePerformingOperationStep(currentStep.getName(), e);
        }

      }
    }

  }
1227347
public void addStep(DeploymentOperationStep step) {
    if(currentStep != null) {
      steps.add(steps.indexOf(currentStep)+1, step);
    } else {
      steps.add(step);
    }
  }
589418
public void setStep(final Integer pstep) {
    if (pstep == null) {
      getInputElement().removeAttribute("step");
    } else {
      getInputElement().setStep(pstep.toString());
    }
  }
252946
public void setStepDetails(java.util.Collection<RemediationExecutionStep> stepDetails) {
        if (stepDetails == null) {
            this.stepDetails = null;
            return;
        }

        this.stepDetails = new com.amazonaws.internal.SdkInternalList<RemediationExecutionStep>(stepDetails);
    }
437615
public void step() throws IOException {
        if (closed) {
            throw new ClosedChannelException();
        }
        if (input.position() == header.length) {
            if (command == null) {
                command = CommandFactory.create(input);
            }

            if (command.complete()) {
                command.process();
                protocolHandler.execute(command, this);
                command = null;
                input.rewind();
            }
        }
    }
753399
def after(self, context):
        ""
        self._invoke(self._after, context)
        run.after_each.execute(context)
1118704
public static function after($clazz, $actions, $afterClazz, $warpAction, $call = null) {
        $actions = static::actionsBuild($actions);
        if (!isset(static::$afterActions[ $clazz ])) {
            static::$afterActions[ $clazz ] = array();
        }
        if (!isset(static::$afterActions[ $clazz ][ $actions[ 'type' ] ])) {
            static::$afterActions[ $clazz ][ $actions[ 'type' ] ] = array();
        }
        $info = array('methods' => $actions[ 'methods' ],
                      'class' => $afterClazz,
                      'action' => $warpAction,
                      "call" => $call,
                      "range" => static::$range);
        static::$range++;
        static::$afterActions[ $clazz ][ $actions[ 'type' ] ][] = $info;
    }
190592
@Override
    public void process(Step step) {
        Attachment attachment = writeAttachmentSafely(getAttachment(), getTitle(), getType());
        step.getAttachments().add(attachment);
    }
194182
public void afterPropertiesSet() {

		ApplicationContext context = this.context;

		if (context == null) {
			throw new IllegalStateException("ApplicationContext not set!");
		}

		Class<?> type = this.type;

		if (type == null) {
			throw new IllegalStateException("No type configured!");
		}

		this.targetSource = new BeansOfTypeTargetSource(context, type, false, exclusions);
	}
1075314
public static void after(@NotNull String path, @NotNull Handler handler) {
        staticInstance().after(prefixPath(path), handler);
    }
553093
private void ProcessNextStep() {

        switch (iSelectionStep) {

            case SELECT_SOURCE_CATALOG :
            case SELECT_DEST_CATALOG :
                if (CatalogToSelect()) {
                    fMain.show();

                    return;
                }
                break;

            case SELECT_DEST_SCHEMA :
            case SELECT_SOURCE_SCHEMA :
                if (SchemaToSelect()) {
                    fMain.show();

                    return;
                }
                break;

            case SELECT_SOURCE_TABLES :
                if (iTransferMode == TRFM_TRANSFER) {
                    bStart.setLabel("Start Transfer");
                } else if (iTransferMode == TRFM_DUMP) {
                    bStart.setLabel("Start Dump");
                } else if (iTransferMode == TRFM_RESTORE) {
                    bStart.setLabel("Start Restore");
                }

                bStart.invalidate();
                bStart.setEnabled(false);
                lTable.setMultipleMode(false);
                RefreshMainDisplay();
                break;

            default :
                break;
        }
    }
271601
public void afterPageDisplay()
    {
        SwingWorker<String,String> worker = new SwingWorker<String,String>()
        {
            public String doInBackground()
            {
                return null;
            }
            public void done()
            {	// This should always be the awt thread
                SwingSyncPageWorker.this.done();
                if (m_syncPage instanceof Task)
                {
                    ((Task)m_syncPage).setStatusText(null, Constants.INFORMATION);
                }
                else if (m_syncPage instanceof JBasePanel)
                {
                    if (((JBasePanel)m_syncPage).getBaseApplet() != null)
                        ((JBasePanel)m_syncPage).getBaseApplet().setStatusText(null, Constants.INFORMATION);
                }
                Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
                if (m_syncPage instanceof Component)
                {
                	((Component)m_syncPage).setCursor(waitCursor);
                    ((Component)m_syncPage).repaint();	// Queue a repaint
                }
            }
        };
        worker.execute();
    }
432965
@Override
    public void executeNext()
    {
        final LifecycleStage nextStage = getNextStage();
        if (nextStage == null) {
            throw new IllegalStateException("Lifecycle already hit the final stage!");
        }
        execute(nextStage);
    }
646410
@AfterBatch
  public void afterDeliver()
  {
    SegmentStream nodeStream = _nodeStream;
    
    if (nodeStream != null) {
      if (_isBlobDirty) {
        _isBlobDirty = false;

        // nodeStream.flush(null);
        nodeStream.fsync(Result.ignore());
      }
      else {
        nodeStream.flush(Result.ignore());
      }
    }
    
    /*
    if (blobWriter != null) {
      try {
        blobWriter.flushSegment();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
    */
  }