Class DefaultJobStatusManager
- java.lang.Object
-
- org.apache.batchee.container.services.status.DefaultJobStatusManager
-
- All Implemented Interfaces:
JobStatusManagerService
,BatchService
public class DefaultJobStatusManager extends Object implements JobStatusManagerService
-
-
Constructor Summary
Constructors Constructor Description DefaultJobStatusManager(ServicesManager servicesManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobStatus
createJobStatus(long jobInstanceId)
This method creates an entry for a new job instanceStepStatus
createStepStatus(long stepExecutionId)
Creates an entry for the step in the stepstatus table during jobsetupJobStatus
getJobStatus(long jobInstanceId)
Returns the JobStatus for a given jobInstance idJobStatus
getJobStatusFromExecutionId(long executionId)
StepStatus
getStepStatus(long jobInstanceId, String stepId)
void
init(Properties batchConfig)
String
toString()
void
updateJobBatchStatus(long jobInstanceId, javax.batch.runtime.BatchStatus batchStatus)
void
updateJobCurrentStep(long jobInstanceId, String currentStepName)
void
updateJobExecutionStatus(long jobInstanceId, javax.batch.runtime.BatchStatus batchStatus, String exitStatus)
void
updateJobStatus(JobStatus jobStatus)
void
updateJobStatusFromJSLStop(long jobInstanceId, String restartOn)
void
updateJobStatusWithNewExecution(long jobInstanceId, long newExecutionId)
void
updateStepStatus(long stepExecutionId, StepStatus newStepStatus)
-
-
-
Constructor Detail
-
DefaultJobStatusManager
public DefaultJobStatusManager(ServicesManager servicesManager)
-
-
Method Detail
-
createJobStatus
public JobStatus createJobStatus(long jobInstanceId) throws BatchContainerServiceException
Description copied from interface:JobStatusManagerService
This method creates an entry for a new job instance- Specified by:
createJobStatus
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
getJobStatus
public JobStatus getJobStatus(long jobInstanceId) throws BatchContainerServiceException
Description copied from interface:JobStatusManagerService
Returns the JobStatus for a given jobInstance id- Specified by:
getJobStatus
in interfaceJobStatusManagerService
- Returns:
- Throws:
BatchContainerServiceException
-
updateJobStatus
public void updateJobStatus(JobStatus jobStatus)
- Specified by:
updateJobStatus
in interfaceJobStatusManagerService
-
getJobStatusFromExecutionId
public JobStatus getJobStatusFromExecutionId(long executionId) throws BatchContainerServiceException
- Specified by:
getJobStatusFromExecutionId
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
updateJobBatchStatus
public void updateJobBatchStatus(long jobInstanceId, javax.batch.runtime.BatchStatus batchStatus) throws BatchContainerServiceException
- Specified by:
updateJobBatchStatus
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
updateJobExecutionStatus
public void updateJobExecutionStatus(long jobInstanceId, javax.batch.runtime.BatchStatus batchStatus, String exitStatus) throws BatchContainerServiceException
- Specified by:
updateJobExecutionStatus
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
updateJobCurrentStep
public void updateJobCurrentStep(long jobInstanceId, String currentStepName) throws BatchContainerServiceException
- Specified by:
updateJobCurrentStep
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
updateJobStatusWithNewExecution
public void updateJobStatusWithNewExecution(long jobInstanceId, long newExecutionId) throws BatchContainerServiceException
- Specified by:
updateJobStatusWithNewExecution
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
createStepStatus
public StepStatus createStepStatus(long stepExecutionId) throws BatchContainerServiceException
Description copied from interface:JobStatusManagerService
Creates an entry for the step in the stepstatus table during jobsetup- Specified by:
createStepStatus
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
getStepStatus
public StepStatus getStepStatus(long jobInstanceId, String stepId) throws BatchContainerServiceException
- Specified by:
getStepStatus
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
updateStepStatus
public void updateStepStatus(long stepExecutionId, StepStatus newStepStatus)
- Specified by:
updateStepStatus
in interfaceJobStatusManagerService
-
init
public void init(Properties batchConfig) throws BatchContainerServiceException
- Specified by:
init
in interfaceBatchService
- Throws:
BatchContainerServiceException
-
updateJobStatusFromJSLStop
public void updateJobStatusFromJSLStop(long jobInstanceId, String restartOn) throws BatchContainerServiceException
- Specified by:
updateJobStatusFromJSLStop
in interfaceJobStatusManagerService
- Throws:
BatchContainerServiceException
-
-