• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FlowExecutionStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.batch.core.job.flow.FlowExecutionStatus的典型用法代码示例。如果您正苦于以下问题:Java FlowExecutionStatus类的具体用法?Java FlowExecutionStatus怎么用?Java FlowExecutionStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FlowExecutionStatus类属于org.springframework.batch.core.job.flow包,在下文中一共展示了FlowExecutionStatus类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: decideIfGoodToContinue

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Bean
public JobExecutionDecider decideIfGoodToContinue() {
    return new JobExecutionDecider() {

        int iteration = 0;

        @Override
        public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
            long postId = 0;
            try {
                postId = jobExecution.getExecutionContext().getLong("postId");
            } catch (Exception e) {
                logger.info("FlowExecution Exception: " + e.getMessage());
            }

            long iterations = jobExecution.getJobParameters().getLong("iterations");
            if(iteration < iterations) {
                logger.info("ITERATING... POSTID = " + postId);
                iteration++;
                return YES;
            } else {
                logger.info("REPEATED 2X's. SKIPPING OPTIONAL STEP");
                return NO;
            }
        }
    };
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:28,代码来源:DemoJobConfiguration.java


示例2: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
/**
 * @param jobExecution set the job execution
 * @param stepExecution set the step execution
 * @return FlowExecutionStatus a status
 */
public final FlowExecutionStatus decide(final JobExecution jobExecution,
		final StepExecution stepExecution) {
	if (jobExecution.getExecutionContext().containsKey(processingModeKey)) {
		return new FlowExecutionStatus("true");
	} else {
		return new FlowExecutionStatus("false");
	}
}
 
开发者ID:RBGKew,项目名称:powop,代码行数:14,代码来源:ExtensionProcessingDecider.java


示例3: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
/**
 * @param jobExecution set the job execution
 * @param stepExecution set the step execution
 * @return FlowExecutionStatus a status
 */
public final FlowExecutionStatus decide(final JobExecution jobExecution,
		final StepExecution stepExecution) {
	if (jobExecution.getExecutionContext().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getExecutionContext().getString(processingModeKey));
	} else if(jobExecution.getJobInstance().getJobParameters().getParameters().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getJobInstance().getJobParameters().getString(processingModeKey));
	}else {
		return new FlowExecutionStatus(defaultProcessingMode);
	}
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:16,代码来源:ConfigurableProcessingModeDecider.java


示例4: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
	if (jobExecution.getJobInstance().getJobParameters().getString(jobParameterName) != null) {
		ExecutionContext executionContext = jobExecution.getExecutionContext();
		JobParameters jobParameters = jobExecution.getJobInstance().getJobParameters();
		if(jobParameterName.equals("download.taxon")) {
			setExecutionContext(executionContext,jobParameters,"taxon.txt","org.emonocot.model.Taxon", "http://rs.tdwg.org/dwc/terms/Taxon");
		} else if(jobParameterName.equals("download.description")) {
			setExecutionContext(executionContext,jobParameters,"description.txt","org.emonocot.model.Description", "http://rs.gbif.org/terms/1.0/Description");
		} else if(jobParameterName.equals("download.distribution")) {
			setExecutionContext(executionContext,jobParameters,"distribution.txt","org.emonocot.model.Distribution", "http://rs.gbif.org/terms/1.0/Distribution");
		} else if(jobParameterName.equals("download.image")) {
			setExecutionContext(executionContext,jobParameters,"image.txt","org.emonocot.model.Image", "http://rs.gbif.org/terms/1.0/Image");
		} else if(jobParameterName.equals("download.reference")) {
			setExecutionContext(executionContext,jobParameters,"reference.txt","org.emonocot.model.Reference", "http://rs.gbif.org/terms/1.0/Reference");
		} else if(jobParameterName.equals("download.typeAndSpecimen")) {
			setExecutionContext(executionContext,jobParameters,"typeAndSpecimen.txt","org.emonocot.model.TypeAndSpecimen", "http://rs.gbif.org/terms/1.0/TypesAndSpecimen");
		} else if(jobParameterName.equals("download.measurementOrFact")) {
			setExecutionContext(executionContext,jobParameters,"measurementOrFact.txt","org.emonocot.model.MeasurementOrFact", "http://rs.tdwg.org/dwc/terms/MeasurementOrFact");
		} else if(jobParameterName.equals("download.vernacularName")) {
			setExecutionContext(executionContext,jobParameters,"vernacularName.txt","org.emonocot.model.VernacularName","http://rs.gbif.org/terms/1.0/VernacularName");
		} else if(jobParameterName.equals("download.identifier")) {
			setExecutionContext(executionContext,jobParameters,"identifier.txt","org.emonocot.model.Identifier", "http://rs.gbif.org/terms/1.0/Identifier");
		}
		return new FlowExecutionStatus("true");
	} else {
		return new FlowExecutionStatus("false");
	}
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:30,代码来源:ExposeParametersDecider.java


示例5: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
/**
 * @param jobExecution set the job execution
 * @param stepExecution set the step execution
 * @return FlowExecutionStatus a status
 */
public final FlowExecutionStatus decide(final JobExecution jobExecution,
		final StepExecution stepExecution) {
	if(processingModeKey == null && defaultProcessingMode == null) {
		logger.error("No processing mode was found.  Unable to continue", new IllegalArgumentException("A processing mode must exist if specified"));
		return FlowExecutionStatus.FAILED;
	}
	if (jobExecution.getExecutionContext().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getExecutionContext().getString(processingModeKey));
	} else if(jobExecution.getJobInstance().getJobParameters().getParameters().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getJobInstance().getJobParameters().getString(processingModeKey));
	}else {
		return new FlowExecutionStatus(defaultProcessingMode);
	}
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:20,代码来源:ConfigurableProcessingModeDecider.java


示例6: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
public final FlowExecutionStatus decide(final JobExecution jobExecution, final StepExecution stepExecution) {
	if (jobExecution.getExecutionContext().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getExecutionContext().getString(processingModeKey));
	} else if(jobExecution.getJobParameters().getParameters().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getJobParameters().getString(processingModeKey));
	} else {
		return new FlowExecutionStatus(defaultProcessingMode);
	}
}
 
开发者ID:RBGKew,项目名称:powop,代码行数:10,代码来源:ConfigurableProcessingModeDecider.java


示例7: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
	if (jobExecution.getJobParameters().getString(jobParameterName) != null) {
		ExecutionContext executionContext = jobExecution.getExecutionContext();
		JobParameters jobParameters = jobExecution.getJobParameters();
		if(jobParameterName.equals("download.taxon")) {
			setExecutionContext(executionContext,jobParameters,"taxon.txt","org.emonocot.model.Taxon", "http://rs.tdwg.org/dwc/terms/Taxon");
		} else if(jobParameterName.equals("download.description")) {
			setExecutionContext(executionContext,jobParameters,"description.txt","org.emonocot.model.Description", "http://rs.gbif.org/terms/1.0/Description");
		} else if(jobParameterName.equals("download.distribution")) {
			setExecutionContext(executionContext,jobParameters,"distribution.txt","org.emonocot.model.Distribution", "http://rs.gbif.org/terms/1.0/Distribution");
		} else if(jobParameterName.equals("download.image")) {
			setExecutionContext(executionContext,jobParameters,"image.txt","org.emonocot.model.Image", "http://rs.gbif.org/terms/1.0/Image");
		} else if(jobParameterName.equals("download.reference")) {
			setExecutionContext(executionContext,jobParameters,"reference.txt","org.emonocot.model.Reference", "http://rs.gbif.org/terms/1.0/Reference");
		} else if(jobParameterName.equals("download.typeAndSpecimen")) {
			setExecutionContext(executionContext,jobParameters,"typeAndSpecimen.txt","org.emonocot.model.TypeAndSpecimen", "http://rs.gbif.org/terms/1.0/TypesAndSpecimen");
		} else if(jobParameterName.equals("download.measurementOrFact")) {
			setExecutionContext(executionContext,jobParameters,"measurementOrFact.txt","org.emonocot.model.MeasurementOrFact", "http://rs.tdwg.org/dwc/terms/MeasurementOrFact");
		} else if(jobParameterName.equals("download.vernacularName")) {
			setExecutionContext(executionContext,jobParameters,"vernacularName.txt","org.emonocot.model.VernacularName","http://rs.gbif.org/terms/1.0/VernacularName");
		} else if(jobParameterName.equals("download.identifier")) {
			setExecutionContext(executionContext,jobParameters,"identifier.txt","org.emonocot.model.Identifier", "http://rs.gbif.org/terms/1.0/Identifier");
		}
		return new FlowExecutionStatus("true");
	} else {
		return new FlowExecutionStatus("false");
	}
}
 
开发者ID:RBGKew,项目名称:powop,代码行数:30,代码来源:ExposeParametersDecider.java


示例8: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
/**
 * @param jobExecution set the job execution
 * @param stepExecution set the step execution
 * @return FlowExecutionStatus a status
 */
public final FlowExecutionStatus decide(final JobExecution jobExecution, final StepExecution stepExecution) {
	if(processingModeKey == null && defaultProcessingMode == null) {
		logger.error("No processing mode was found.  Unable to continue", new IllegalArgumentException("A processing mode must exist if specified"));
		return FlowExecutionStatus.FAILED;
	}

	if (jobExecution.getExecutionContext().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getExecutionContext().getString(processingModeKey));
	} else if(jobExecution.getJobParameters().getParameters().containsKey(processingModeKey)) {
		return new FlowExecutionStatus(jobExecution.getJobParameters().getString(processingModeKey));
	} else {
		return new FlowExecutionStatus(defaultProcessingMode);
	}
}
 
开发者ID:RBGKew,项目名称:powop,代码行数:20,代码来源:ConfigurableProcessingModeDecider.java


示例9: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
	String jobMode = jobExecution.getJobInstance().getJobParameters().getString("jobMode");
	if (REPLACE.equalsIgnoreCase(jobMode)) {
		return new FlowExecutionStatus("erase");
	}
	return FlowExecutionStatus.COMPLETED;
}
 
开发者ID:SmarterApp,项目名称:TechnologyReadinessTool,代码行数:9,代码来源:EraserDecider.java


示例10: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
    if (!stepExecution.getExitStatus().equals(ExitStatus.FAILED) &&
        stepExecution.getSkipCount() > 0) {
        return new FlowExecutionStatus("COMPLETED WITH SKIPS");
    } else {
        return new FlowExecutionStatus(jobExecution.getExitStatus().getExitCode());
    }
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:10,代码来源:SkippedItemsDecider.java


示例11: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
	String targetFile = jobExecution.getJobParameters().getString("archiveFile");
	if (batchService.exists(targetFile)) {
		return new FlowExecutionStatus("FILE EXISTS");
	} else {
		return new FlowExecutionStatus("NO FILE");
	}
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:10,代码来源:FileExistsDecider.java


示例12: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
	if (stepExecution.getWriteCount() > 0) {
		return new FlowExecutionStatus("NEXT");
	}
	return FlowExecutionStatus.COMPLETED;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:8,代码来源:NextDecider.java


示例13: testNextStatus

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Test
public void testNextStatus() {
    // Step 에서 Write 작업이 5번 일어났다면...
    stepExecution.setWriteCount(5);
    FlowExecutionStatus status = decider.decide(jobExecution, stepExecution);
    assertThat(status.getName()).isEqualTo("NEXT");
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:8,代码来源:NextDeciderTest.java


示例14: testCompletedStatus

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Test
public void testCompletedStatus() {
    // Step에서 Write 작업이 한번도 일어나지 않았다면... 더 이상 할 일이 없다...
    stepExecution.setWriteCount(0);
    FlowExecutionStatus status = decider.decide(jobExecution, stepExecution);
    assertThat(status).isEqualTo(FlowExecutionStatus.COMPLETED);
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:8,代码来源:NextDeciderTest.java


示例15: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
    FlowExecutionStatus status =
        stepExecution.getSkipCount() == 0
        ? FlowExecutionStatus.COMPLETED
        : new FlowExecutionStatus("SKIPPED");

    if (log.isTraceEnabled())
        log.trace("FlowExecutionStatus를 결정했습니다. FlowExecutionStatus=[{}]", status);

    return status;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:13,代码来源:SkippedDecider.java


示例16: c

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
private String c(FlowExecutionStatus executionStatus) {
    return executionStatus.getName();
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:4,代码来源:DemoJobConfiguration.java


示例17: searchForParameter

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
protected FlowExecutionStatus searchForParameter(Set<Object> values) {
	if(values.contains(parameter)) {
		return new FlowExecutionStatus("parameter");
	}
	return new FlowExecutionStatus("not found");
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:7,代码来源:ParameterPresenceDecider.java


示例18: decide

import org.springframework.batch.core.job.flow.FlowExecutionStatus; //导入依赖的package包/类
/**
 * stepExecution의 exitCode를 변경 없이 return
 */
public FlowExecutionStatus decide(JobExecution jobExecution,
		StepExecution stepExecution) {
	
	return new FlowExecutionStatus(stepExecution.getExitStatus().getExitCode());
}
 
开发者ID:eGovFrame,项目名称:egovframework.rte.root,代码行数:9,代码来源:EgovDecider.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Processor类代码示例发布时间:2022-05-22
下一篇:
Java TlsClientProtocol类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap