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


Java ExitStatus.COMPLETED属性代码示例

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


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

示例1: packArchive

/**
 * @param source The directory containing the DwC/A files
 * @param target The absolute filepath for where to write the archive
 * @return
 */
public static final ExitStatus packArchive(final String source, final String target) {

	logger.info("Attempting to pack " + source + " to " +  target);
	try { //to wrap things we can de-reference immediately
		File sourceDir = new File(source);
		if(!sourceDir.exists()) {
			throw new FileNotFoundException("Unable to find filesystem resource - " + source);
		}
		if(!sourceDir.isDirectory()) {
			throw new IllegalArgumentException(source + " is not a folder");
		}

		zip(source, target);
		return ExitStatus.COMPLETED;
	} catch (Exception e) {
		logger.error("Error writing " + source + " to " + target, e);
		return ExitStatus.FAILED;
	}
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:24,代码来源:FileResourceZipper.java

示例2: afterStep

public ExitStatus afterStep(StepExecution stepExecution)
{
  if (stepExecution.getReadCount() == 0)
  {
    LogUtil.getCoreLog().info("Job executed but readCount is 0 (No record or no one valid line)");
    return ExitStatus.FAILED;
  }
  return ExitStatus.COMPLETED;
}
 
开发者ID:iisi-nj,项目名称:GemFireLite,代码行数:9,代码来源:StepExecutionListener.java

示例3: afterStep

public ExitStatus afterStep(StepExecution sStepExecution) {
    synchronized (lock) {
        initialized = false;
        keys = null;
    }
    return ExitStatus.COMPLETED;
}
 
开发者ID:acxio,项目名称:AGIA,代码行数:7,代码来源:HibernateNodeReader.java

示例4: afterStep

@Override
public ExitStatus afterStep(StepExecution stepExecution) {
    if (someItemsGotSkippedDueToTaxWebServiceExceptions(stepExecution)) {
        //stepExecution.setStatus(BatchStatus.FAILED);
        return ExitStatus.FAILED;
    }
    return ExitStatus.COMPLETED;
}
 
开发者ID:cegeka,项目名称:batchers,代码行数:8,代码来源:FailedStepStepExecutionListener.java

示例5: afterStep

@Override
public ExitStatus afterStep(StepExecution stepExecution) {
    
    log.debug("after step tasks: ");
    
    scjObjectDeleter.deleteScChambersWithoutJudgments();
    scjObjectDeleter.deleteScChamberDivisionsWithoutJudgments();
    scjObjectDeleter.deleteScjFormsWithoutJudgments();
    judgmentObjectDeleter.deleteMeansOfAppealWithoutJudgments(CourtType.SUPREME);
    judgmentObjectDeleter.deleteJudgmentResultsWithoutJudgments(CourtType.SUPREME);

    return ExitStatus.COMPLETED;
}
 
开发者ID:CeON,项目名称:saos,代码行数:13,代码来源:ScjImportProcessStepExecutionListener.java

示例6: afterStep

@Override
public ExitStatus afterStep(StepExecution stepExecution) {
    
    judgmentObjectDeleter.deleteMeansOfAppealWithoutJudgments(CourtType.CONSTITUTIONAL_TRIBUNAL);
    judgmentObjectDeleter.deleteJudgmentResultsWithoutJudgments(CourtType.CONSTITUTIONAL_TRIBUNAL);
    
    return ExitStatus.COMPLETED;
}
 
开发者ID:CeON,项目名称:saos,代码行数:8,代码来源:CtjImportProcessStepExecutionListener.java

示例7: afterStep

@Override
public ExitStatus afterStep(StepExecution stepExecution) {
    
    judgmentObjectDeleter.deleteMeansOfAppealWithoutJudgments(CourtType.NATIONAL_APPEAL_CHAMBER);
    judgmentObjectDeleter.deleteJudgmentResultsWithoutJudgments(CourtType.NATIONAL_APPEAL_CHAMBER);
    
    return ExitStatus.COMPLETED;
}
 
开发者ID:CeON,项目名称:saos,代码行数:8,代码来源:NacjImportProcessStepExecutionListener.java

示例8: afterStep

@Override
public ExitStatus afterStep(StepExecution stepExecution) {
	// To make the job execution fail, set the step execution to fail
	// and return failed ExitStatus
	// stepExecution.setStatus(BatchStatus.FAILED);
	// return ExitStatus.FAILED;
	return ExitStatus.COMPLETED;
}
 
开发者ID:spring-projects,项目名称:spring-xd-samples,代码行数:8,代码来源:HelloSpringXDTasklet.java

示例9: afterStep

@AfterStep
public ExitStatus afterStep(StepExecution stepExecution) {
	log.info("스텝 완료 후 호출됩니다. StepName=[{}], ExitStatus=[{}]",
	         stepExecution.getStepName(), stepExecution.getExitStatus());

	return ExitStatus.COMPLETED;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:7,代码来源:ImportProductsExecutionListener.java

示例10: mapResult

private ExitStatus mapResult(Object result) {
    if (result instanceof ExitStatus) {
        return (ExitStatus) result;
    }
    return ExitStatus.COMPLETED;
}
 
开发者ID:sunguangran,项目名称:navi,代码行数:6,代码来源:AbstractNaviLongTasklet.java

示例11: afterStep

@Override
public ExitStatus afterStep(StepExecution stepExecution) {
    LOGGER.info("afterStep");
    return ExitStatus.COMPLETED;
}
 
开发者ID:mcmoulis,项目名称:spring_study,代码行数:5,代码来源:CustomStepExecutionListener.java

示例12: unpackArchive

/**
 *
 * @param archiveName
 *            The name of the archive file to unpack
 * @param unpackDirectory
 *            The directory to unpack the file into
 * @return an exit status indicating whether this
 *         step was successfully completed
 */
public final ExitStatus unpackArchive(final String archiveName,
		final String unpackDirectory) {
	try {
		File directory = new File(unpackDirectory);
		if (!directory.exists()) {
			directory.mkdir();
		}
		BufferedOutputStream bufferedOutputStream = null;
		BufferedInputStream bufferedInputStream = null;
		ZipEntry entry;
		ZipFile zipfile = new ZipFile(archiveName);
		Enumeration entries = zipfile.entries();
		while (entries.hasMoreElements()) {
			entry = (ZipEntry) entries.nextElement();
			if(entry.getName().indexOf("/") != -1) {
				// entry is in a subdir
				String subDirectoryName = entry.getName().substring(0, entry.getName().indexOf("/"));
				File subDirectory = new File(directory,subDirectoryName);
				if(!subDirectory.exists()) {
					subDirectory.mkdirs();
				}
			}
			logger.debug("Extracting: " + entry + " from " + archiveName);
			bufferedInputStream = new BufferedInputStream(
					zipfile.getInputStream(entry));
			int count;
			byte[] data = new byte[BUFFER];
			FileOutputStream fileOutputStream = new FileOutputStream(
					new File(directory, entry.getName()));
			bufferedOutputStream = new BufferedOutputStream(
					fileOutputStream, BUFFER);
			while (
					(count
							= bufferedInputStream.read(data, 0, BUFFER)) != -1) {
				bufferedOutputStream.write(data, 0, count);
			}
			bufferedOutputStream.flush();
			bufferedOutputStream.close();
			bufferedInputStream.close();
		}
	} catch (IOException ioe) {
		logger.error("Input Output Exception unpacking "
				+ archiveName + " " + ioe.getLocalizedMessage());
		return ExitStatus.FAILED;
	}

	return ExitStatus.COMPLETED;
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:57,代码来源:ArchiveUnpacker.java

示例13: afterStep

@Override
public ExitStatus afterStep(StepExecution sStepExecution) {
    return ExitStatus.COMPLETED;
}
 
开发者ID:acxio,项目名称:AGIA,代码行数:4,代码来源:AlfrescoNodeReader.java

示例14: afterStep

@Override
public ExitStatus afterStep(StepExecution stepExecution) {
    return ExitStatus.COMPLETED;
}
 
开发者ID:CeON,项目名称:saos,代码行数:4,代码来源:IndexingJobStepExecutionListener.java


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