public class EgovBatchRunner extends Object
개정이력(Modification Information)
수정일 수정자 수정내용
------- -------- ---------------------------
2012.06.28 이도형 최초 생성
2012.07.03 이도형 Job Parameter 변환 메소드 추가
| Constructor and Description |
|---|
EgovBatchRunner(org.springframework.batch.core.launch.JobOperator jobOperator,
org.springframework.batch.core.explore.JobExplorer jobExplorer,
org.springframework.batch.core.repository.JobRepository jobRepository)
EgovBatchRunner 생성자
JobOperator, JobExplorer, JobRepository를 설정한다.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addJobParameter(String jobParameters,
String parameterName,
String parameterValue)
이미 생성되어 있는 JobParamters String에 JobParameter를 추가한다.
|
String |
convertJobParametersToString(org.springframework.batch.core.JobParameters jobParamters)
JobParamters를 String으로 변환한다.
|
String |
createUniqueJobParameters()
실행에 필요한 JobParameters String을 생성한다.
|
org.springframework.batch.core.JobExecution |
getJobExecution(Long jobExecutionId)
JobExecution ID로 JobExecution를 조회한다.
|
List<org.springframework.batch.core.JobExecution> |
getJobExecutions(Long jobExecutionId)
JobExecution ID로 JobExecution를 조회한다.
|
org.springframework.batch.core.explore.JobExplorer |
getJobExplorer()
JobExplorer를 사용할 수 있도록 가져온다.
|
org.springframework.batch.core.JobInstance |
getJobInstance(Long jobExecutionId)
JobExecution ID로 JobInstance를 조회한다.
|
Set<String> |
getJobNames()
여러건의 등록된 Job을 조회한다.
|
org.springframework.batch.core.launch.JobOperator |
getJobOperator()
JobOperator를 사용할 수 있도록 가져온다.
|
org.springframework.batch.core.repository.JobRepository |
getJobRepository()
JobRepository를 사용할 수 있도록 가져온다.
|
org.springframework.batch.core.JobExecution |
getLastJobExecution(String jobName,
org.springframework.batch.core.JobParameters jobParameters)
마지막으로 수행된 JobExecution를 조회한다.
|
org.springframework.batch.core.StepExecution |
getLastStepExecution(Long jobExecutionId,
String stepName)
마지막으로 수행된 StepExecution를 조회한다.
|
Long |
restart(Long jobExecutionId)
정지, 종료되었거나 실패한 Batch Job을 재시작한다.
|
Long |
start(String jobName,
String jobParameters)
Batch Job을 시작한다.
|
void |
stop(Long jobExecutionId)
실행 중인 Batch Job을 정지한다.
|
public EgovBatchRunner(org.springframework.batch.core.launch.JobOperator jobOperator,
org.springframework.batch.core.explore.JobExplorer jobExplorer,
org.springframework.batch.core.repository.JobRepository jobRepository)
jobOperator - jobExplorer - jobRepository - public org.springframework.batch.core.launch.JobOperator getJobOperator()
public org.springframework.batch.core.explore.JobExplorer getJobExplorer()
public org.springframework.batch.core.repository.JobRepository getJobRepository()
public Long start(String jobName, String jobParameters) throws org.springframework.batch.core.launch.NoSuchJobException, org.springframework.batch.core.JobParametersInvalidException, org.springframework.batch.core.launch.JobInstanceAlreadyExistsException
jobName - : Job 이름jobParameters: - String 형태의 Job 파라미터들org.springframework.batch.core.launch.NoSuchJobExceptionorg.springframework.batch.core.JobParametersInvalidExceptionorg.springframework.batch.core.launch.JobInstanceAlreadyExistsExceptionpublic Long restart(Long jobExecutionId) throws org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException, org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.launch.NoSuchJobException, org.springframework.batch.core.repository.JobRestartException, org.springframework.batch.core.JobParametersInvalidException
jobExecutionId - : JobExecution의 IDorg.springframework.batch.core.repository.JobInstanceAlreadyCompleteExceptionorg.springframework.batch.core.launch.NoSuchJobExecutionExceptionorg.springframework.batch.core.launch.NoSuchJobExceptionorg.springframework.batch.core.repository.JobRestartExceptionorg.springframework.batch.core.JobParametersInvalidExceptionpublic void stop(Long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.launch.JobExecutionNotRunningException
jobExecutionId - : JobExecution의 IDorg.springframework.batch.core.launch.NoSuchJobExecutionExceptionorg.springframework.batch.core.launch.JobExecutionNotRunningExceptionpublic String createUniqueJobParameters()
public String addJobParameter(String jobParameters, String parameterName, String parameterValue)
jobParameters - parameterName - : 추가할 JobParamter 이름parameterValue - : 추가할 JobParamter 값public String convertJobParametersToString(org.springframework.batch.core.JobParameters jobParamters)
jobParamters - public org.springframework.batch.core.JobExecution getJobExecution(Long jobExecutionId)
jobExecutionId - : JobExecution의 IDpublic List<org.springframework.batch.core.JobExecution> getJobExecutions(Long jobExecutionId)
jobExecutionId - : JobExecution의 IDpublic org.springframework.batch.core.JobExecution getLastJobExecution(String jobName, org.springframework.batch.core.JobParameters jobParameters)
jobName - : Job 이름jobParameters - : Job 파라미터들public org.springframework.batch.core.StepExecution getLastStepExecution(Long jobExecutionId, String stepName)
jobExecutionId - : JobExecution의 IDstepName - : Step 이름public org.springframework.batch.core.JobInstance getJobInstance(Long jobExecutionId)
jobExecutionId - : JobExecution의 IDCopyright © 2015. All rights reserved.