本文整理汇总了Java中javax.batch.runtime.StepExecution.getEndTime方法的典型用法代码示例。如果您正苦于以下问题:Java StepExecution.getEndTime方法的具体用法?Java StepExecution.getEndTime怎么用?Java StepExecution.getEndTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.batch.runtime.StepExecution
的用法示例。
在下文中一共展示了StepExecution.getEndTime方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: asArray
import javax.batch.runtime.StepExecution; //导入方法依赖的package包/类
private static Object[] asArray(final StepExecution n) {
return new Object[] {
n.getStepExecutionId(),
n.getStepName(),
n.getBatchStatus().name(),
n.getExitStatus(),
n.getStartTime() != null ? n.getStartTime().toString() : "",
n.getEndTime() != null ? n.getEndTime().toString() : "",
metric(n.getMetrics(), Metric.MetricType.READ_COUNT),
metric(n.getMetrics(), Metric.MetricType.WRITE_COUNT),
metric(n.getMetrics(), Metric.MetricType.COMMIT_COUNT),
metric(n.getMetrics(), Metric.MetricType.ROLLBACK_COUNT),
metric(n.getMetrics(), Metric.MetricType.READ_SKIP_COUNT),
metric(n.getMetrics(), Metric.MetricType.PROCESS_SKIP_COUNT),
metric(n.getMetrics(), Metric.MetricType.WRITE_SKIP_COUNT),
metric(n.getMetrics(), Metric.MetricType.FILTER_COUNT)
};
}
示例2: stepExecutions
import javax.batch.runtime.StepExecution; //导入方法依赖的package包/类
private void stepExecutions(StepExecution stepExecution) {
assertEquals("the batch has completed", COMPLETED, stepExecution.getBatchStatus());
assertEquals("the batch has completed", COMPLETED.name(), stepExecution.getExitStatus());
Date startTime = stepExecution.getStartTime();
Date endTime = stepExecution.getEndTime();
assertNotNull("The step is started", startTime);
assertNotNull("Tha batch has failed", endTime);
assertTrue("Dates are ok", startTime.before(endTime));
stepMetrics(stepExecution.getMetrics(), 2, 3, 3);
assertNull("No user available", stepExecution.getPersistentUserData());
assertNotNull("New step execution id", stepExecution.getStepExecutionId());
assertEquals("The name of the step", "process", stepExecution.getStepName());
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:15,代码来源:SimpleJobTestCase.java
示例3: stepExecutions
import javax.batch.runtime.StepExecution; //导入方法依赖的package包/类
private void stepExecutions(StepExecution stepExecution, boolean last) {
assertEquals("the batch has completed", COMPLETED, stepExecution.getBatchStatus());
assertEquals("the batch has completed", COMPLETED.name(), stepExecution.getExitStatus());
Date startTime = stepExecution.getStartTime();
Date endTime = stepExecution.getEndTime();
assertNotNull("The step is started", startTime);
assertNotNull("Tha batch has failed", endTime);
assertTrue("Dates are ok", startTime.before(endTime));
stepMetrics(stepExecution.getMetrics());
assertNull("No user available", stepExecution.getPersistentUserData());
assertNotNull("New step execution id", stepExecution.getStepExecutionId());
assertEquals("The name of the step", last ? "sendemail" : "copyfiles", stepExecution.getStepName());
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:15,代码来源:MailJobTestCase.java
示例4: stepExecutionToString
import javax.batch.runtime.StepExecution; //导入方法依赖的package包/类
/**
* @return a stringified version of the stepExecution record
*/
public String stepExecutionToString(StepExecution stepExecution) {
return "stepExecutionID="+stepExecution.getStepExecutionId()
+ ", stepName="+stepExecution.getStepName()
+ ", exitStatus="+ stepExecution.getExitStatus()
+ ", batchStatus="+stepExecution.getBatchStatus()
+ ", startTime="+stepExecution.getStartTime()
+ ", endTime=" +stepExecution.getEndTime()
+ ", metrics=" + metricsToString(stepExecution.getMetrics());
}