Package org.springframework.batch.core

Examples of org.springframework.batch.core.StepExecution


  @Qualifier("jobs/executions/steps")
  private View view;

  @Test
  public void testLaunchViewWithStepExecutions() throws Exception {
    StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution();
    model.put("stepExecutions", Arrays.asList(new StepExecutionInfo(stepExecution, TimeZone.getTimeZone("GMT"))));
    model.put("jobExecutionInfo",
        new JobExecutionInfo(stepExecution.getJobExecution(), TimeZone.getTimeZone("GMT")));
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    assertTrue(content.contains("Step Executions"));
    assertTrue(content.contains("for Job = job"));
View Full Code Here


    } while (!stepExecutions.isEmpty());
    return count;
  }

  public double getLatestDuration() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    if (stepExecution==null) {
      return 0;
    }
    Date endTime = stepExecution.getEndTime();
    return (endTime != null ? endTime.getTime() : System.currentTimeMillis())
        - stepExecution.getStartTime().getTime();
  }
View Full Code Here

    StepExecutionHistory history = computeHistory(stepName);
    return history.getDuration().getMax();
  }

  public int getLatestReadCount() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getReadCount();
  }
View Full Code Here

    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getReadCount();
  }

  public int getLatestWriteCount() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getWriteCount();
  }
View Full Code Here

    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getWriteCount();
  }

  public int getLatestFilterCount() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getFilterCount();
  }
View Full Code Here

  public StepExecutionInfo(String jobName, Long jobExecutionId, String name, TimeZone timeZone) {
    this.jobName = jobName;
    this.jobExecutionId = jobExecutionId;
    this.name = name;
    this.stepExecution = new StepExecution(name, new JobExecution(jobExecutionId));
  }
View Full Code Here

    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getFilterCount();
  }

  public int getLatestSkipCount() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getSkipCount();
  }
View Full Code Here

    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getSkipCount();
  }

  public int getLatestCommitCount() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getCommitCount();
  }
View Full Code Here

    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getCommitCount();
  }

  public int getLatestRollbackCount() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getRollbackCount();
  }
View Full Code Here

    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? 0 : stepExecution.getRollbackCount();
  }

  public long getLatestExecutionId() {
    StepExecution stepExecution = getLatestStepExecution(stepName);
    return stepExecution == null ? -1 : stepExecution.getId();
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.StepExecution

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.