/** * Checks whether the job was aborted or not (i.e. killed). That is, if * the job started and is no longer running, while it never * marked as finished. Remember that under normal conditions, a job * should always finish, whether it failed or not. An aborted progress * is usually the results of a job suite which got "killed" in the middle * of its execution (not having the chance to return properly). * @return <code>true</code> if job was started * @since 1.1 */ @Override public boolean isAborted() { return isStarted() && !isRunning() && duration.getEndTime() == null && !isCompleted(); }
@Override public void visitJobStatus(IJobStatus jobStatus) { MutableJobStatus status = (MutableJobStatus) jobStatus; status.setStopRequested(false); JobDuration duration = status.getDuration(); if (status.isStarted() && !status.isCompleted()) { status.incrementResumeAttempts(); if (duration != null) { duration.setResumedStartTime( duration.getStartTime()); duration.setResumedLastActivity( status.getLastActivity()); } } } });