com.ibm.batch.container.services.impl
Class JobStatusManagerImpl

java.lang.Object
  extended by com.ibm.batch.container.services.impl.JobStatusManagerImpl
All Implemented Interfaces:
IBatchServiceBase, IJobStatusManagerService

public class JobStatusManagerImpl
extends Object
implements IJobStatusManagerService


Constructor Summary
JobStatusManagerImpl()
           
 
Method Summary
 JobStatus createJobStatus(JobInstance jobInstance, long firstJobExecutionId)
          This method creates an entry for a new job instance
 void createStepStatus(long jobInstanceId, String stepId, StepStatus newStepStatus)
          Creates an entry for the step in the stepstatus table during jobsetup
 List<JobStatus> getAllJobStatus()
          Returns a list of all jobstatus currently in the DB
 JobStatus getJobStatus(long jobInstanceId)
          Returns the JobStatus for a given jobInstance id
 StepStatus getStepStatus(long jobInstanceId, String stepId)
          Gets the status for the given step belonging to the current job
 void init(IBatchConfig batchConfig)
           
 void shutdown()
           
 void updateEntireStepStatus(long jobInstanceId, String stepId, StepStatus newStepStatus)
           
 void updateJobBatchStatus(long jobInstanceId, ExecutionStatus.BatchStatus batchStatus)
           
 void updateJobCurrentStep(long jobInstanceId, String currentStepName)
          Updates the current step of the job, updates the stepstatus to be IN SETUP and sends the update to the scheduler
 void updateJobExecutionStatus(long jobInstanceId, ExecutionStatus.BatchStatus batchStatus, String exitStatus)
           
 void updateJobStatusFromJSLStop(long jobInstanceId, String restartOn)
           
 void updateJobStatusWithNewExecution(long jobInstanceId, long newExecutionId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobStatusManagerImpl

public JobStatusManagerImpl()
Method Detail

shutdown

public void shutdown()
              throws BatchContainerServiceException
Specified by:
shutdown in interface IBatchServiceBase
Throws:
BatchContainerServiceException

createJobStatus

public JobStatus createJobStatus(JobInstance jobInstance,
                                 long firstJobExecutionId)
                          throws BatchContainerServiceException
Description copied from interface: IJobStatusManagerService
This method creates an entry for a new job instance

Specified by:
createJobStatus in interface IJobStatusManagerService
Throws:
BatchContainerServiceException

getJobStatus

public JobStatus getJobStatus(long jobInstanceId)
                       throws BatchContainerServiceException
Description copied from interface: IJobStatusManagerService
Returns the JobStatus for a given jobInstance id

Specified by:
getJobStatus in interface IJobStatusManagerService
Returns:
Throws:
BatchContainerServiceException

updateJobBatchStatus

public void updateJobBatchStatus(long jobInstanceId,
                                 ExecutionStatus.BatchStatus batchStatus)
                          throws BatchContainerServiceException
Specified by:
updateJobBatchStatus in interface IJobStatusManagerService
Throws:
BatchContainerServiceException

updateJobExecutionStatus

public void updateJobExecutionStatus(long jobInstanceId,
                                     ExecutionStatus.BatchStatus batchStatus,
                                     String exitStatus)
                              throws BatchContainerServiceException
Specified by:
updateJobExecutionStatus in interface IJobStatusManagerService
Throws:
BatchContainerServiceException

updateJobCurrentStep

public void updateJobCurrentStep(long jobInstanceId,
                                 String currentStepName)
                          throws BatchContainerServiceException
Description copied from interface: IJobStatusManagerService
Updates the current step of the job, updates the stepstatus to be IN SETUP and sends the update to the scheduler

Specified by:
updateJobCurrentStep in interface IJobStatusManagerService
Throws:
BatchContainerServiceException

updateJobStatusWithNewExecution

public void updateJobStatusWithNewExecution(long jobInstanceId,
                                            long newExecutionId)
                                     throws BatchContainerServiceException
Specified by:
updateJobStatusWithNewExecution in interface IJobStatusManagerService
Throws:
BatchContainerServiceException

createStepStatus

public void createStepStatus(long jobInstanceId,
                             String stepId,
                             StepStatus newStepStatus)
                      throws BatchContainerServiceException
Description copied from interface: IJobStatusManagerService
Creates an entry for the step in the stepstatus table during jobsetup

Specified by:
createStepStatus in interface IJobStatusManagerService
Throws:
BatchContainerServiceException

getStepStatus

public StepStatus getStepStatus(long jobInstanceId,
                                String stepId)
                         throws BatchContainerServiceException
Description copied from interface: IJobStatusManagerService
Gets the status for the given step belonging to the current job

Specified by:
getStepStatus in interface IJobStatusManagerService
Returns:
Throws:
BatchContainerServiceException

updateEntireStepStatus

public void updateEntireStepStatus(long jobInstanceId,
                                   String stepId,
                                   StepStatus newStepStatus)
Specified by:
updateEntireStepStatus in interface IJobStatusManagerService

init

public void init(IBatchConfig batchConfig)
          throws BatchContainerServiceException
Specified by:
init in interface IBatchServiceBase
Throws:
BatchContainerServiceException

getAllJobStatus

public List<JobStatus> getAllJobStatus()
                                throws BatchContainerServiceException
Description copied from interface: IJobStatusManagerService
Returns a list of all jobstatus currently in the DB

Specified by:
getAllJobStatus in interface IJobStatusManagerService
Returns:
Throws:
BatchContainerServiceException

updateJobStatusFromJSLStop

public void updateJobStatusFromJSLStop(long jobInstanceId,
                                       String restartOn)
                                throws BatchContainerServiceException
Specified by:
updateJobStatusFromJSLStop in interface IJobStatusManagerService
Throws:
BatchContainerServiceException


Copyright © 2013. All Rights Reserved.