@Override public void stop() { stepContext.setBatchStatus(BatchStatus.STOPPING); // we don't need to call stop on the chunk implementation here since a // chunk always returns control to // the batch container after every item. }
@Override public void stop() { stepContext.setBatchStatus(BatchStatus.STOPPING); // we don't need to call stop on the chunk implementation here since a // chunk always returns control to // the batch container after every item. }
protected synchronized boolean wasStopIssued() { // Might only be set to stopping at the job level. Use the lock for this object on this // method along with the stop() method if (jobExecutionImpl.getJobContext().getBatchStatus().equals(BatchStatus.STOPPING)){ stepContext.setBatchStatus(BatchStatus.STOPPING); return true; } else { return false; } } @Override
protected void updateBatchStatus(BatchStatus updatedBatchStatus) { logger.fine("Updating batch status from : " + stepStatus.getBatchStatus() + ", to: " + updatedBatchStatus); stepStatus.setBatchStatus(updatedBatchStatus); _jobStatusService.updateStepStatus(stepStatus.getStepExecutionId(), stepStatus); stepContext.setBatchStatus(updatedBatchStatus); }
protected synchronized boolean wasStopIssued() { // Might only be set to stopping at the job level. Use the lock for this object on this // method along with the stop() method if (jobExecutionImpl.getJobContext().getBatchStatus().equals(BatchStatus.STOPPING)){ stepContext.setBatchStatus(BatchStatus.STOPPING); return true; } else { return false; } } @Override
protected void updateBatchStatus(BatchStatus updatedBatchStatus) { logger.fine("Updating batch status from : " + stepStatus.getBatchStatus() + ", to: " + updatedBatchStatus); stepStatus.setBatchStatus(updatedBatchStatus); _jobStatusService.updateStepStatus(stepStatus.getStepExecutionId(), stepStatus); stepContext.setBatchStatus(updatedBatchStatus); }
@Override public synchronized void stop() { // It is possible for stop() to be issued before process() if (BatchStatus.STARTING.equals(stepContext.getBatchStatus()) || BatchStatus.STARTED.equals(stepContext.getBatchStatus())) { stepContext.setBatchStatus(BatchStatus.STOPPING); if (batchletProxy != null) { batchletProxy.stop(); } } else { //TODO do we need to throw an error if the batchlet is already stopping/stopped //a stop gets issued twice } }
@Override public synchronized void stop() { // It is possible for stop() to be issued before process() if (BatchStatus.STARTING.equals(stepContext.getBatchStatus()) || BatchStatus.STARTED.equals(stepContext.getBatchStatus())) { stepContext.setBatchStatus(BatchStatus.STOPPING); if (batchletProxy != null) { batchletProxy.stop(); } } else { //TODO do we need to throw an error if the batchlet is already stopping/stopped //a stop gets issued twice } }
protected void statusStarting() { stepStatus.setBatchStatus(BatchStatus.STARTING); _jobStatusService.updateJobCurrentStep(jobInstance.getInstanceId(), step.getId()); _jobStatusService.updateStepStatus(stepStatus.getStepExecutionId(), stepStatus); stepContext.setBatchStatus(BatchStatus.STARTING); }
protected void statusStarting() { stepStatus.setBatchStatus(BatchStatus.STARTING); _jobStatusService.updateJobCurrentStep(jobInstance.getInstanceId(), step.getId()); _jobStatusService.updateStepStatus(stepStatus.getStepExecutionId(), stepStatus); stepContext.setBatchStatus(BatchStatus.STARTING); }
stepContext.setBatchStatus(BatchStatus.FAILED);
stepContext.setBatchStatus(BatchStatus.FAILED);