Package org.springframework.batch.admin.history

Examples of org.springframework.batch.admin.history.JobExecutionHistory


  }

  public double getLatestDuration() {
    JobExecution jobExecution = getLatestJobExecution(jobName);
    JobExecutionHistory history = new JobExecutionHistory(jobName);
    history.append(jobExecution);
    return history.getDuration().getMean();
  }
View Full Code Here


    history.append(jobExecution);
    return history.getDuration().getMean();
  }

  public double getMeanDuration() {
    JobExecutionHistory history = computeHistory(jobName);
    return history.getDuration().getMean();
  }
View Full Code Here

    JobExecutionHistory history = computeHistory(jobName);
    return history.getDuration().getMean();
  }

  public double getMaxDuration() {
    JobExecutionHistory history = computeHistory(jobName);
    return history.getDuration().getMax();
  }
View Full Code Here

    }
    return stepExecution;
  }

  private JobExecutionHistory computeHistory(String jobName, int total) {
    JobExecutionHistory jobExecutionHistory = new JobExecutionHistory(jobName);
    try {
      for (JobExecution jobExecution : jobService.listJobExecutionsForJob(jobName, 0, total)) {
        jobExecutionHistory.append(jobExecution);
      }
    }
    catch (NoSuchJobException e) {
      throw new IllegalStateException("Cannot locate job=" + jobName, e);
    }
View Full Code Here

TOP

Related Classes of org.springframework.batch.admin.history.JobExecutionHistory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.