当前位置: 首页>>代码示例>>Java>>正文


Java BatchStatus.COMPLETED属性代码示例

本文整理汇总了Java中org.springframework.batch.core.BatchStatus.COMPLETED属性的典型用法代码示例。如果您正苦于以下问题:Java BatchStatus.COMPLETED属性的具体用法?Java BatchStatus.COMPLETED怎么用?Java BatchStatus.COMPLETED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.springframework.batch.core.BatchStatus的用法示例。


在下文中一共展示了BatchStatus.COMPLETED属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
    if(jobExecution.getStatus() == BatchStatus.COMPLETED) {
        logger.info("!!! JOB FINISHED! LAST POSTID IMPORTED: " +
                jobExecution.getExecutionContext().get("postId") );
    }
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:7,代码来源:DemoJobListener.java

示例2: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
    if(jobExecution.getStatus() == BatchStatus.COMPLETED) {
        long statId = (long) jobExecution.getExecutionContext().get("statId");
        logger.info("!!! GITHUB JOB FINISHED! CURRENT STATID: " +  statId);

        ExitStatus es = jobExecution.getExitStatus();
        jobExecution.setExitStatus(new ExitStatus(es.getExitCode(), String.valueOf(statId)));
    }
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:10,代码来源:GithubJobListener.java

示例3: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
    if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
        StatusJobs.getMonitor(JOB_NAME, JOB_GROUP, jobExecution.getExecutionContext())
                  .done();
    }

    if (jobExecution.getStatus() == BatchStatus.FAILED) {
        StatusJobs.getMonitor(JOB_NAME, JOB_GROUP, jobExecution.getExecutionContext())
                  .fail("Execution failure");
    }
}
 
开发者ID:appstatus,项目名称:appstatus-spring-boot-starter,代码行数:12,代码来源:OneExecutionListener.java

示例4: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
	if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
		log.info("!!! JOB FINISHED! Time to verify the results");

		List<Person> results = personDao.findAll();

		for (Person person : results) {
			log.info("Found <" + person + "> in the database.");
		}

	}
}
 
开发者ID:lospatitos,项目名称:springboot-batch-doma,代码行数:13,代码来源:JobCompletionNotificationListener.java

示例5: isJobExecutionStoppable

/**
 * Determine whether the provided {@link JobExecution} is stoppable.
 *
 * @param jobExecution Must not be null and its {@link BatchStatus} must not be null
 * either.
 * @return Never returns null
 */
public static boolean isJobExecutionStoppable(JobExecution jobExecution) {
	Assert.notNull(jobExecution, "The provided jobExecution must not be null.");

	final BatchStatus batchStatus = jobExecution.getStatus();
	Assert.notNull(batchStatus, "The BatchStatus of the provided jobExecution must not be null.");

	return batchStatus.isLessThan(BatchStatus.STOPPING) && batchStatus != BatchStatus.COMPLETED;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:15,代码来源:JobUtils.java

示例6: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
    if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
        log.info("+++ job finished!");
        jdbcTemplate
                .query("SELECT login, passwd, age FROM person", (RowMapper<Person>) (rs, row) -> new Person(rs.getString(1), rs.getString(2), rs.getInt(3)))
                .stream().forEach(p -> log.info("Found {} in the ds", p));

    }
}
 
开发者ID:przodownikR1,项目名称:springBatchJmsKata,代码行数:10,代码来源:JobCompletionNotificationListener.java

示例7: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
    if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
        log.debug("Ticket import job completed.");
        metrics.stream()
                .map(metric -> String.format("%s = %s", metric.getMetricName(), metric.getMetricValue()))
                .forEach(log::debug);
    }
}
 
开发者ID:create1st,项目名称:spring-batch,代码行数:9,代码来源:TicketImportJobExecutionListener.java

示例8: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
   	if(jobExecution.getStatus() == BatchStatus.COMPLETED) {
   		logger.info("Job execution was successful");
   	}else {
   		logger.info("Job failed with status {}",jobExecution.getStatus() );
   	}
   }
 
开发者ID:SoatGroup,项目名称:json-file-itemwriter,代码行数:8,代码来源:JobCompletionNotificationListener.java

示例9: consider

public boolean consider(final JobExecution execution) {
	if (execution != null) {
		if (latestExecution == null) {
			latestExecution = execution;
		}

		if (latestSuccessfulExecution == null && execution.getStatus() == BatchStatus.COMPLETED) {
			latestSuccessfulExecution = execution;
		}
	}

	return isComplete();
}
 
开发者ID:phjardas,项目名称:spring-batch-tools,代码行数:13,代码来源:LatestExecutions.java

示例10: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
    
    if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
        judgmentEnrichmentHashRepository.markAllAsProcessed();
    }
}
 
开发者ID:CeON,项目名称:saos,代码行数:7,代码来源:EnrichmentHashProcessedFlagMarker.java

示例11: afterJob

@Override
public void afterJob(JobExecution jobExecution) {
    log.info("작업 결과 상세. 시작=[{}], 완료=[{}], ExitStatus=[{}]",
             jobExecution.getStartTime(), jobExecution.getEndTime(), jobExecution.getExitStatus());

    if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
        log.info("작업이 성공적으로 완료되었습니다.");
    } else if (jobExecution.getStatus() == BatchStatus.FAILED) {
        log.info("작업이 실패했습니다.");
    }
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:11,代码来源:ImportProductsJobListener.java


注:本文中的org.springframework.batch.core.BatchStatus.COMPLETED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。